Browse code

use the pointer returned from realloc, because it can change location. not doing so leads to hard to reproduce bugs!

git-svn: trunk@3956

Török Edvin authored on 2008/07/16 17:44:37
Showing 1 changed files
... ...
@@ -506,7 +506,7 @@ static inline char *textbuffer_done(yyscan_t scanner)
506 506
 	if(!str) {
507 507
 		str = scanner->buf.data;
508 508
 	}
509
-	scanner->yytext = scanner->buf.data;
509
+	scanner->yytext = str;
510 510
 	scanner->yylen = scanner->buf.pos - 1;
511 511
 	memset(&scanner->buf, 0, sizeof(scanner->buf));
512 512
 	return str;