diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-08-03 15:32:16 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-08-03 15:32:16 +0200 |
commit | 09151748500b86d3dc3322ac35100cab0b655c2d (patch) | |
tree | b1367fd6bfdd0ab63eaa1f81164659eb6619c4a4 /sys/src/libcontrol/control.c | |
parent | 9289c4b796b03fc1f164964466542090a2779be4 (diff) |
libcontrol: use strtol() to parse integer arguments
Diffstat (limited to 'sys/src/libcontrol/control.c')
-rw-r--r-- | sys/src/libcontrol/control.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/libcontrol/control.c b/sys/src/libcontrol/control.c index 62a441524..f83cea089 100644 --- a/sys/src/libcontrol/control.c +++ b/sys/src/libcontrol/control.c @@ -416,9 +416,9 @@ ctlparse(CParse *cp, char *s, int hasreceiver) cp->receiver = nil; for(i=0; i<cp->nargs; i++){ t = cp->args[i]; - while(*t == '[') /* %R gives [0 0] [1 1]; atoi will stop at closing ] */ + while(*t == '[') /* %R gives [0 0] [1 1]; strtol will stop at closing ] */ t++; - cp->iargs[i] = atoi(t); + cp->iargs[i] = strtol(t, 0, 0); } return cp->nargs; } |