Use strtoul in expand(1) and force base 10

This commit is contained in:
FRIGN 2015-01-25 15:07:13 +01:00
parent 692c11bf2b
commit 5f448d9a8b
1 changed files with 1 additions and 1 deletions

View File

@ -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 != ' ')