From 03308f6c2746a756a8404d00caa20f8f35248167 Mon Sep 17 00:00:00 2001 From: Luiz Capitulino Date: Mon, 17 May 2010 17:50:01 -0300 Subject: [PATCH] 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 --- json-lexer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/json-lexer.c b/json-lexer.c index 9d649205a7..0b145d125c 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)