From e36a3b5d26b0b9d3cce70594cbdf70e5bf14c01b Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Wed, 28 Apr 1993 14:54:51 -0400 Subject: (yylex): Don't use unsigned comparison to also check for < 0; do it explicitly. From-SVN: r4257 --- gcc/c-lex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/c-lex.c b/gcc/c-lex.c index ea6c015..13ec3a2 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; -- cgit v1.1