Changeset 918e236f in mainline


Ignore:
Timestamp:
2011-06-19T13:27:09Z (13 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fb90deb
Parents:
5ee9692
Message:

strtold(): fix a bug introduced in previous commit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/stdlib/strtold.c

    r5ee9692 r918e236f  
    287287                }
    288288               
    289                 while (isdigit(str[i]) && exp < 65536) {
    290                         exp *= DEC_BASE;
    291                         exp += str[i] - '0';
     289                while (isdigit(str[i])) {
     290                        if (exp < 65536) {
     291                                exp *= DEC_BASE;
     292                                exp += str[i] - '0';
     293                        }
    292294                       
    293295                        i++;
     
    439441                }
    440442               
    441                 while (isdigit(str[i]) && exp < 65536) {
    442                         exp *= DEC_BASE;
    443                         exp += str[i] - '0';
     443                while (isdigit(str[i])) {
     444                        if (exp < 65536) {
     445                                exp *= DEC_BASE;
     446                                exp += str[i] - '0';
     447                        }
    444448                       
    445449                        i++;
Note: See TracChangeset for help on using the changeset viewer.