From: Petri Lehtinen Date: Mon, 15 Jun 2009 19:30:52 +0000 (+0300) Subject: Fix json_set_error X-Git-Tag: v1.0~40 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=jansson.git;a=commitdiff_plain;h=ae5ed3ff70d3fee53d37304ad4af56650082db33 Fix json_set_error Both error->line and error->text were set improperly, sigh. --- diff --git a/src/load.c b/src/load.c index 14022ca..5f49fbc 100644 --- a/src/load.c +++ b/src/load.c @@ -63,7 +63,10 @@ static void json_set_error(json_error_t *error, const json_lex *lex, } } else - snprintf(error->text, JSON_ERROR_TEXT_LENGTH, "%s", msg); + { + error->line = -1; + snprintf(error->text, JSON_ERROR_TEXT_LENGTH, "%s", text); + } }