summaryrefslogtreecommitdiff
path: root/libc/iconvdata/tcvn5712-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/iconvdata/tcvn5712-1.c')
-rw-r--r--libc/iconvdata/tcvn5712-1.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libc/iconvdata/tcvn5712-1.c b/libc/iconvdata/tcvn5712-1.c
index 49d5430f2..90c8610f9 100644
--- a/libc/iconvdata/tcvn5712-1.c
+++ b/libc/iconvdata/tcvn5712-1.c
@@ -1,5 +1,5 @@
/* Conversion to and from TCVN5712-1.
- Copyright (C) 2001, 2002, 2004, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
@@ -378,8 +378,9 @@ static const struct
/* Determine whether there is a buffered character pending. */ \
last_ch = *statep >> 3; \
\
- /* We have to buffer ch if it is a possible match in comp_table_data. */ \
- must_buffer_ch = (ch >= 0x0041 && ch <= 0x01b0); \
+ /* We have to buffer ch if it is a possible match in comp_table_data \
+ and if it isn't the last char of the string. */ \
+ must_buffer_ch = (ch >= 0x0041 && ch <= 0x01b0) && (inptr + 1 != inend); \
\
if (last_ch) \
{ \