diff options
| -rw-r--r-- | src/stdlib/_strtoi.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/stdlib/_strtoi.h b/src/stdlib/_strtoi.h index a46d6c0c..21b22ee9 100644 --- a/src/stdlib/_strtoi.h +++ b/src/stdlib/_strtoi.h @@ -112,6 +112,10 @@ nptr++; } + if (endptr && (*endptr == NULL)) { + *endptr = (void*)nptr; + } + if (overflow) { ret = (sign == 1) ? max : min; } else { |
