david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[parseopt] Allow "0x"-prefixed hexadecimal values in integer-valued options

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown 2010-11-29 14:18:43 +00:00
parent 1fcea25c42
commit 01df5c510f
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ int parse_integer ( const char *text, unsigned int *value ) {
assert ( text != NULL );
/* Parse integer */
*value = strtoul ( text, &endp, 10 );
*value = strtoul ( text, &endp, 0 );
if ( *endp ) {
printf ( "\"%s\": invalid integer value\n", text );
return -EINVAL;