From 96e32e55d54b6584fec2752abecd23f99fe8e2be Mon Sep 17 00:00:00 2001
From: Arne Goedeke <el@laramies.com>
Date: Sun, 3 Nov 2013 17:11:09 +0100
Subject: [PATCH] parser: fixed possible use of uninitialized offset

---
 src/lexer.h | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/lexer.h b/src/lexer.h
index 155d65febd..8b36bf6744 100644
--- a/src/lexer.h
+++ b/src/lexer.h
@@ -915,7 +915,7 @@ unknown_directive:
     {
       char *p1, *p2;
       double f;
-      long l = 0;		/* GCC thinks l is unitialized here. Hmm..? */
+      long l;
       struct svalue sval;
 
       lex->pos -= (1<<SHIFT);
@@ -975,8 +975,7 @@ unknown_directive:
 #endif /* 0 */
 	lex->pos=p1;
 	if (lex_isidchar (LOOK())) {
-	  my_yyerror ("Invalid char '%c' in constant.",
-		      INDEX_CHARP (lex->pos, l, SHIFT));
+	  my_yyerror ("Invalid char '%c' in constant.", LOOK());
 	  do SKIP(); while (lex_isidchar (LOOK()));
 	}
 	return TOK_FLOAT;
@@ -987,8 +986,7 @@ unknown_directive:
 	debug_malloc_touch(yylval->n);
 	lex->pos=p2;
 	if (lex_isidchar (LOOK())) {
-	  my_yyerror ("Invalid char '%c' in constant.",
-		      INDEX_CHARP (lex->pos, l, SHIFT));
+	  my_yyerror ("Invalid char '%c' in constant.", LOOK());
 	  do SKIP(); while (lex_isidchar (LOOK()));
 	}
 	return TOK_NUMBER;
-- 
GitLab