From ee13c667f10ab6e3ccde9493e71f7ac79496f9e7 Mon Sep 17 00:00:00 2001 From: Petri Lehtinen Date: Thu, 13 Sep 2012 08:46:14 +0300 Subject: [PATCH] Fix json_real_set() to return -1 on error --- src/value.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;