X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/660d641a03456e99ea83c68dbd3d03bae2b64573..e47e52a2c8f2d925cefe2f5f1a55ceceb7ca0813:/client/util.c?ds=sidebyside diff --git a/client/util.c b/client/util.c index fa24906d..15e911a1 100644 --- a/client/util.c +++ b/client/util.c @@ -188,7 +188,7 @@ uint8_t param_get8ex(const char *line, int paramnum, int deflt, int base) int bg, en; if (!param_getptr(line, &bg, &en, paramnum)) - return strtol(&line[bg], NULL, base) & 0xff; + return strtoul(&line[bg], NULL, base) & 0xff; else return deflt; } @@ -198,7 +198,7 @@ uint32_t param_get32ex(const char *line, int paramnum, int deflt, int base) int bg, en; if (!param_getptr(line, &bg, &en, paramnum)) - return strtol(&line[bg], NULL, base); + return strtoul(&line[bg], NULL, base); else return deflt; } @@ -208,7 +208,7 @@ uint64_t param_get64ex(const char *line, int paramnum, int deflt, int base) int bg, en; if (!param_getptr(line, &bg, &en, paramnum)) - return strtoll(&line[bg], NULL, base); + return strtoull(&line[bg], NULL, base); else return deflt;