shithub: scc

Download patch

ref: 2fc8ee279b55d1da274fc17ef6ab73efcdd1c206
parent: 7a353b8e7e4bfa7b9f9ad26d33f9863489e4b84c
author: Roberto E. Vargas Caballero <[email protected]>
date: Tue Apr 15 06:58:47 EDT 2014

Fix integer parse

While the scanner is parsing it uses yybuf, no yytext, so
atoi must be done over yybuf.

--- a/lex.c
+++ b/lex.c
@@ -41,7 +41,7 @@
 
 	sym = install("", NS_IDEN);
 	sym->type = inttype;
-	sym->u.i = atoi(yytext);
+	sym->u.i = atoi(yybuf);
 	yynlval.sym = sym;
 	return CONSTANT;
 }