summaryrefslogtreecommitdiffstats
path: root/3
diff options
context:
space:
mode:
authorSadeep Madurange <smadurange@users.noreply.github.com>2021-12-04 08:42:36 +0800
committerSadeep Madurange <smadurange@users.noreply.github.com>2021-12-04 08:42:36 +0800
commit8e6cbc215e31bfd016a392d992e2b9a74da20580 (patch)
tree0e644babd9f7c87696d974dee76ba2c73718371d /3
parente8bd1d3cc26edd2bea198152f6fe167206201ec5 (diff)
downloadk&r-exercises-8e6cbc215e31bfd016a392d992e2b9a74da20580.tar.gz
3.4
Diffstat (limited to '3')
-rw-r--r--3/4.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/3/4.c b/3/4.c
index 1ba196c..5ddf2ef 100644
--- a/3/4.c
+++ b/3/4.c
@@ -27,7 +27,7 @@ void itoa(int n, char s[]) {
i = 0;
- if (n >= 0) {
+ if (n != INT_MIN) {
do {
s[i++] = n % 10 + '0';
} while ((n /= 10) > 0);