From: Luiz Capitulino Date: Mon, 17 May 2010 20:50:01 +0000 (-0300) Subject: json-lexer: Initialize 'x' and 'y' X-Git-Tag: v0.13.0-rc0~264^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=03308f6c2746a756a8404d00caa20f8f35248167;p=thirdparty%2Fqemu.git json-lexer: Initialize 'x' and 'y' The 'lexer' variable is passed by the caller, it can contain anything (eg. garbage). Signed-off-by: Luiz Capitulino --- diff --git a/json-lexer.c b/json-lexer.c index 9d649205a7f..0b145d125cb 100644 --- a/json-lexer.c +++ b/json-lexer.c @@ -275,6 +275,7 @@ void json_lexer_init(JSONLexer *lexer, JSONLexerEmitter func) lexer->emit = func; lexer->state = IN_START; lexer->token = qstring_new(); + lexer->x = lexer->y = 0; } static int json_lexer_feed_char(JSONLexer *lexer, char ch)