aboutsummaryrefslogtreecommitdiff
path: root/src/value.c
diff options
context:
space:
mode:
authorPetri Lehtinen <petri@digip.org>2012-09-13 08:46:14 +0300
committerPetri Lehtinen <petri@digip.org>2012-09-13 08:46:56 +0300
commitee13c667f10ab6e3ccde9493e71f7ac79496f9e7 (patch)
tree1a6d94f2227a6e62f3c8a3b2a3dd811b8d7b37d3 /src/value.c
parent23d563434ac6e385ef3599bbe0360aa8e1c94a23 (diff)
downloadjansson-ee13c667f10ab6e3ccde9493e71f7ac79496f9e7.zip
jansson-ee13c667f10ab6e3ccde9493e71f7ac79496f9e7.tar.gz
jansson-ee13c667f10ab6e3ccde9493e71f7ac79496f9e7.tar.bz2
Fix json_real_set() to return -1 on error
Diffstat (limited to 'src/value.c')
-rw-r--r--src/value.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/value.c b/src/value.c
index 8d05d91..547eb5d 100644
--- a/src/value.c
+++ b/src/value.c
@@ -751,7 +751,7 @@ double json_real_value(const json_t *json)
int json_real_set(json_t *json, double value)
{
if(!json_is_real(json))
- return 0;
+ return -1;
json_to_real(json)->value = value;