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 2442973..4c46948 100644
--- a/ext/nkf/nkf.c
+++ b/ext/nkf/nkf.c
@@ -78,7 +78,7 @@ rb_nkf_kconv(obj, opt, src)
}
kanji_convert(NULL);
- output_ctr--;
+ if (output_ctr > 0) output_ctr--;
if (output[output_ctr] == '\0') {
/*
printf("([%c][%d])\n", output[output_ctr], output_ctr);