Fix json_real_set() to return -1 on error

This commit is contained in:
Petri Lehtinen 2012-09-13 08:46:14 +03:00
parent 23d563434a
commit ee13c667f1

View file

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