diff options
Diffstat (limited to 'locale/programs/stringtrans.c')
-rw-r--r-- | locale/programs/stringtrans.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/locale/programs/stringtrans.c b/locale/programs/stringtrans.c index 17f9670025..b810129678 100644 --- a/locale/programs/stringtrans.c +++ b/locale/programs/stringtrans.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996. @@ -21,6 +21,7 @@ # include <config.h> #endif +#include <assert.h> #include <stdlib.h> #include "charset.h" @@ -77,8 +78,11 @@ translate_string (char *str, struct charset_t *charset) tp = &str[1]; while (tp[0] != '\0' && tp[0] != '>') - if (tp[0] == '\\' && tp[1] != '\0') - tp += 2; + if (tp[0] == '\\') + if (tp[1] != '\0') + tp += 2; + else + ++tp; else ++tp; |