diff options
Diffstat (limited to 'firmware/libc')
-rw-r--r-- | firmware/libc/atoi.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/firmware/libc/atoi.c b/firmware/libc/atoi.c index 3393839b27..00617c3d13 100644 --- a/firmware/libc/atoi.c +++ b/firmware/libc/atoi.c | |||
@@ -26,7 +26,10 @@ int atoi (const char *str) | |||
26 | { | 26 | { |
27 | int value = 0; | 27 | int value = 0; |
28 | int sign = 1; | 28 | int sign = 1; |
29 | 29 | ||
30 | if (!str) | ||
31 | return 0; | ||
32 | |||
30 | while (isspace(*str)) | 33 | while (isspace(*str)) |
31 | { | 34 | { |
32 | str++; | 35 | str++; |