Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[parseopt] Allow "0x"-prefixed hexadecimal values in integer-valued o…
…ptions

Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Nov 29, 2010
1 parent 1fcea25 commit 01df5c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/parseopt.c
Expand Up @@ -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;
Expand Down

0 comments on commit 01df5c5

Please sign in to comment.