diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2010-05-17 17:50:01 -0300 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2010-06-11 15:25:14 -0300 |
commit | 03308f6c2746a756a8404d00caa20f8f35248167 (patch) | |
tree | 638ddadeedbbf658d702d368c1f803e74b0c17de | |
parent | 0e2029a063405091ee34170ef71aa321715e4357 (diff) |
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 <lcapitulino@redhat.com>
-rw-r--r-- | json-lexer.c | 1 |
1 files changed, 1 insertions, 0 deletions
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) |