projects
/
jansson.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82dffff
)
Fix json_set_error
author
Petri Lehtinen
<petri@digip.org>
Mon, 15 Jun 2009 19:30:52 +0000
(22:30 +0300)
committer
Petri Lehtinen
<petri@digip.org>
Mon, 15 Jun 2009 19:30:52 +0000
(22:30 +0300)
Both error->line and error->text were set improperly, sigh.
src/load.c
patch
|
blob
|
history
diff --git
a/src/load.c
b/src/load.c
index
14022ca
..
5f49fbc
100644
(file)
--- 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);
+ }
}