|
@@ -164,7 +164,7 @@ unsigned long strtoul ( const char *p, char **endp, int base ) {
|
164
|
164
|
}
|
165
|
165
|
|
166
|
166
|
while ( 1 ) {
|
167
|
|
- charval = *(p++) - '0';
|
|
167
|
+ charval = ( *p - '0' );
|
168
|
168
|
if ( charval > ( 'A' - '0' - 10 ) )
|
169
|
169
|
charval -= ( 'A' - '0' - 10 );
|
170
|
170
|
if ( charval > ( 'a' - 'A' ) )
|
|
@@ -172,6 +172,7 @@ unsigned long strtoul ( const char *p, char **endp, int base ) {
|
172
|
172
|
if ( charval >= ( unsigned int ) base )
|
173
|
173
|
break;
|
174
|
174
|
ret = ( ( ret * base ) + charval );
|
|
175
|
+ p++;
|
175
|
176
|
}
|
176
|
177
|
|
177
|
178
|
if ( endp )
|