[ RFC Index | RFC Search | Usenet FAQs | Web FAQs | Documents | Cities ]

    Search the Archives
Display RFC by number
    


RFC 1751: There's a bug in the reference code. The 128-bit/12-word...

<< Back to: RFC 1751

 
Reader comments:
 

Comment by davids@webmaster.com
Submitted on 10/28/2004
Related RFC: RFC 1751
Rating: Rate this comment: Vote
There's a bug in the reference code. The 128-bit/12-word code miscounts words when the first word is only one character long, causing the second 64-bit conversion to fail!This code can be fixed several ways:  for (eng2 = eng; rc<7 && (*(++eng2) != '\0'); )    if (*eng2 != ' ')      {        rc += state;        state = 0;      }    else state=1;I like:  for (eng2 = eng; rc<7 && (*eng2 != '\0'); eng2++)   if (*eng2 != ' ')   {    rc += state;    state = 0;   }   else state=1;  eng2--;

 
 
FAQS.ORG makes no guarantees as to the accuracy of the posts. Each post is the personal opinion of the poster. These posts are not intended to substitute for medical, tax, legal, investment, accounting, or other professional advice. FAQS.ORG does not endorse any opinion or any product or service mentioned mentioned in these posts.

<< Back to: RFC 1751


© 2008 FAQS.ORG. All rights reserved.