Compare commits

...

2 Commits

Author SHA1 Message Date
Maschell
3b5cc2f932 Fix small typo in storage test 2024-03-02 10:58:15 +01:00
Maschell
e02376e5a1 Fix WUPSConfigItemMultipleValues::CreateFromValue 2024-03-02 10:58:15 +01:00
2 changed files with 3 additions and 3 deletions

View File

@ -62,10 +62,10 @@ std::optional<WUPSConfigItemMultipleValues> WUPSConfigItemMultipleValues::Create
if (defaultIndex != -1 && currentValueIndex != -1) { if (defaultIndex != -1 && currentValueIndex != -1) {
break; break;
} }
if (cur.value == defaultValue) { if (cur.value == currentValue) {
currentValueIndex = i; currentValueIndex = i;
} }
if (cur.value == currentValue) { if (cur.value == defaultValue) {
defaultIndex = i; defaultIndex = i;
} }
i++; i++;

View File

@ -977,5 +977,5 @@ TEST_CASE("Store empty binary works") {
std::vector<uint8_t> get_vector{0x13, 0x37}; std::vector<uint8_t> get_vector{0x13, 0x37};
res = WUPSStorageAPI::Get("test", get_vector); res = WUPSStorageAPI::Get("test", get_vector);
REQUIRE(res == WUPS_STORAGE_ERROR_SUCCESS); REQUIRE(res == WUPS_STORAGE_ERROR_SUCCESS);
REQUIRE(empty_vector.empty()); REQUIRE(get_vector.empty());
} }