comparison vamp-json/VampJson.h @ 177:1990dd9570d8

Fix populating ListResponse from JSON response, incorrect indexing.
author Lucas Thompson <dev@lucas.im>
date Tue, 31 Jan 2017 22:58:38 +0000
parents 60dc013bd69c
children bd543e74a9bf
comparison
equal deleted inserted replaced
176:60dc013bd69c 177:1990dd9570d8
847 847
848 static ListResponse 848 static ListResponse
849 toListResponse(json11::Json j, std::string &err) { 849 toListResponse(json11::Json j, std::string &err) {
850 850
851 ListResponse resp; 851 ListResponse resp;
852 for (const auto &a: j["result"]["available"].array_items()) { 852 for (const auto &a: j["available"].array_items()) {
853 resp.available.push_back(toPluginStaticData(a, err)); 853 resp.available.push_back(toPluginStaticData(a, err));
854 if (failed(err)) return {}; 854 if (failed(err)) return {};
855 } 855 }
856 return resp; 856 return resp;
857 } 857 }