From f8a533af5d47a0bf541112dbe1c8c4f4dd8ac624 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 13 Apr 2019 02:09:23 +0200 Subject: [PATCH] style --- client/jansson/path.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/jansson/path.c b/client/jansson/path.c index 943338f42..bafea59ba 100644 --- a/client/jansson/path.c +++ b/client/jansson/path.c @@ -110,7 +110,7 @@ int json_path_set_new(json_t *json, const char *path, json_t *value, size_t flag if (expect == path_delims) { break; } else { - jsonp_error_set(error, -1, -1, buf, json_error_invalid_format, "missing ']'?"); + jsonp_error_set(error, -1, -1, last_peek - buf, json_error_invalid_format, "missing ']'?"); goto fail; } } @@ -182,7 +182,7 @@ int json_path_set_new(json_t *json, const char *path, json_t *value, size_t flag json_array_set(parent, index_saved, value); cursor = json_array_get(parent, index_saved); } else { - jsonp_error_set(error, -1, -1, (peek) ? peek - buf : buf, json_error_item_not_found, "invalid path"); + jsonp_error_set(error, -1, -1, last_peek - buf, json_error_item_not_found, "invalid path"); goto fail; }