libsys: let optset parse largeish positive values

Note that strtoul() also parses negative numbers correctly.
This commit is contained in:
David van Moolenbroek 2012-09-03 11:51:56 +00:00
parent 087ace4459
commit 41df1b59f1

View file

@ -55,7 +55,7 @@ int len;
case OPT_INT:
if (len > 0)
val = strtol(ptr, NULL, entry->os_val);
val = (int) strtoul(ptr, NULL, entry->os_val);
else
val = 0;