diff options
author | Damien George <damien.p.george@gmail.com> | 2014-01-15 23:08:33 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-01-15 23:08:33 +0000 |
commit | b99d9ea25830b4b2e384c180012ee0ddc23f1316 (patch) | |
tree | d01307a42acaf1b2d9c60daaa85efddbd4363904 | |
parent | 613eb25545e26e12c77af7154feb0ad039d86429 (diff) | |
download | micropython-b99d9ea25830b4b2e384c180012ee0ddc23f1316.tar.gz micropython-b99d9ea25830b4b2e384c180012ee0ddc23f1316.zip |
Add errno=0 before call.
-rw-r--r-- | py/strtonum.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/py/strtonum.c b/py/strtonum.c index 02c1506683..48a746603f 100644 --- a/py/strtonum.c +++ b/py/strtonum.c @@ -60,6 +60,7 @@ long strtonum(const char *restrict s, int base) { p--; } + errno = 0; found = strtol(p, &num, base); if (errno) { goto value_error; |