From 6c6d1ac1a6eac24f1416523a882adc064e863e24 Mon Sep 17 00:00:00 2001 From: "roel@libnfc.org" Date: Tue, 26 Mar 2013 20:42:18 +0000 Subject: [PATCH] fixed signed/unsigned problem --- client/util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/util.c b/client/util.c index fa24906d1..15e911a14 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;