Fix json_set_error

Both error->line and error->text were set improperly, sigh.
This commit is contained in:
Petri Lehtinen 2009-06-15 22:30:52 +03:00
parent 82dffff71f
commit ae5ed3ff70

View File

@ -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);
}
}