http://git.etherboot.org
/
people
/
xl0
/
gpxe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
65ff535
)
Fixed endp bug in strtoul()
author
Michael Brown
<mcb30@etherboot.org>
Wed, 15 Nov 2006 02:54:28 +0000
(
02:54
+0000)
committer
Michael Brown
<mcb30@etherboot.org>
Wed, 15 Nov 2006 02:54:28 +0000
(
02:54
+0000)
src/core/misc.c
patch
|
blob
|
history
diff --git
a/src/core/misc.c
b/src/core/misc.c
index
2765f7d
..
968e232
100644
(file)
--- a/
src/core/misc.c
+++ b/
src/core/misc.c
@@
-164,7
+164,7
@@
unsigned long strtoul ( const char *p, char **endp, int base ) {
}
while ( 1 ) {
- charval =
*(p++) - '0'
;
+ charval =
( *p - '0' )
;
if ( charval > ( 'A' - '0' - 10 ) )
charval -= ( 'A' - '0' - 10 );
if ( charval > ( 'a' - 'A' ) )
@@
-172,6
+172,7
@@
unsigned long strtoul ( const char *p, char **endp, int base ) {
if ( charval >= ( unsigned int ) base )
break;
ret = ( ( ret * base ) + charval );
+ p++;
}
if ( endp )