From d75a88eb9f97fcf8b2ff4a0ede00684de46a83d4 Mon Sep 17 00:00:00 2001 From: ntim Date: Thu, 17 Mar 2016 09:06:28 +0100 Subject: [PATCH] Retreived one light more than necessary. Former-commit-id: 6ee5b0f4a86210fcf4bf3ee96b369aff20c25720 --- libsrc/leddevice/LedDevicePhilipsHue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsrc/leddevice/LedDevicePhilipsHue.cpp b/libsrc/leddevice/LedDevicePhilipsHue.cpp index 332176ad..20c347f8 100755 --- a/libsrc/leddevice/LedDevicePhilipsHue.cpp +++ b/libsrc/leddevice/LedDevicePhilipsHue.cpp @@ -263,7 +263,7 @@ void LedDevicePhilipsHue::saveStates(unsigned int nLights) { throw std::runtime_error("No lights found"); } // Loop over all children. - for (Json::ValueIterator it = json.begin(); it != json.end() && lightIds.size() <= nLights; it++) { + for (Json::ValueIterator it = json.begin(); it != json.end() && lightIds.size() < nLights; it++) { int lightId = atoi(it.key().asCString()); lightIds.push_back(lightId); std::cout << "LedDevicePhilipsHue::saveStates(nLights=" << nLights << "): found light with id " << lightId