Allow hex notation in int type options
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 30 Apr 2013 18:03:14 +0000 (20:03 +0200)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 30 Apr 2013 18:51:42 +0000 (20:51 +0200)
options.c

index f261e70..8315aaf 100644 (file)
--- a/options.c
+++ b/options.c
@@ -140,7 +140,7 @@ fw3_parse_bool(void *ptr, const char *val, bool is_list)
 bool
 fw3_parse_int(void *ptr, const char *val, bool is_list)
 {
-       int n = strtol(val, NULL, 10);
+       int n = strtol(val, NULL, 0);
 
        if (errno == ERANGE || errno == EINVAL)
                return false;