[hackers] [sbase] Use strtoul in expand(1) and force base 10 || FRIGN

From: <git_AT_suckless.org>
Date: Sun, 25 Jan 2015 15:09:48 +0100 (CET)

commit d345440301eb7c402b40cbeacc2d8fb632070a57
Author: FRIGN <dev_AT_frign.de>
Date: Sun Jan 25 15:07:13 2015 +0100

    Use strtoul in expand(1) and force base 10

diff --git a/expand.c b/expand.c
index 78b5454..126fe32 100644
--- a/expand.c
+++ b/expand.c
_AT_@ -33,7 +33,7 @@ parselist(const char *s, size_t slen)
 
         m = 0;
         for (i = 0; i < slen; i += sep - (s + i) + 1) {
- tablist[m++] = strtol(s + i, &sep, 0);
+ tablist[m++] = strtoul(s + i, &sep, 10);
                 if (tablist[m - 1] == 0)
                         eprintf("expand: tab size can't be zero.\n");
                 if (*sep && *sep != ',' && *sep != ' ')
Received on Sun Jan 25 2015 - 15:09:48 CET

This archive was generated by hypermail 2.3.0 : Sun Jan 25 2015 - 15:12:14 CET