From 1e272932f1273adabc681ec34bbae05a37ddfa4f Mon Sep 17 00:00:00 2001 From: horchi Date: Tue, 4 Oct 2016 19:50:16 +0200 Subject: [PATCH] patched to compile with older libjansson versions --- tvsp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tvsp.c b/tvsp.c index c3a11a1..836e6ab 100644 --- a/tvsp.c +++ b/tvsp.c @@ -520,7 +520,8 @@ void Tvsp::createXmlNode(json_t *jdata, const char *jkey, xmlNodePtr parent) { std::ostringstream actors; size_t arraySize = json_array_size(value); - json_array_foreach(value, index, arrValue) { + + for (index = 0; index < json_array_size(value) && (arrValue = json_array_get(value, index)); index++){ // if images or actors -> create new parent std::string mykey(key); if (mykey.find("images") != std::string::npos) {