summaryrefslogtreecommitdiff
path: root/ext/nkf/nkf.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/nkf/nkf.c')
-rw-r--r--ext/nkf/nkf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/nkf/nkf.c b/ext/nkf/nkf.c
index 35d9295a748..80d0d2e4be1 100644
--- a/ext/nkf/nkf.c
+++ b/ext/nkf/nkf.c
@@ -10,7 +10,7 @@
#undef getc
#undef ungetc
-#define getc(f) (input_ctr>i_len?-1:input[input_ctr++])
+#define getc(f) (input_ctr<i_len?input[input_ctr++]:-1)
#define ungetc(c,f) input_ctr--
#undef putchar