diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-04-28 18:54:51 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-04-28 18:54:51 +0000 |
commit | 27fe6bb34b3d0134a2e2479ed3d996ac18799176 (patch) | |
tree | 403a19a08c461e5d987b48e7be0f6124bd70aaab /gcc/c-lex.c | |
parent | 557ebdac0fe202e9c813ff7df4328077fb16124c (diff) | |
download | gcc-27fe6bb34b3d0134a2e2479ed3d996ac18799176.tar.gz |
(yylex): Don't use unsigned comparison to also check for < 0; do it
explicitly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4257 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-lex.c')
-rw-r--r-- | gcc/c-lex.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c index ea6c0156aa9..13ec3a229aa 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -1934,7 +1934,7 @@ yylex () #ifdef MULTIBYTE_CHARS len = mbstowcs ((wchar_t *) widep, token_buffer + 1, p - token_buffer); - if ((unsigned) len >= (p - token_buffer)) + if (len < 0 || len >= (p - token_buffer)) { warning ("Ignoring invalid multibyte string"); len = 0; |