]> repos.lx-s.de Git - winmute.git/commitdiff
Fixed json parsing
authorlx-s <lx-s@users.noreply.github.com>
Tue, 19 Dec 2023 13:59:15 +0000 (14:59 +0100)
committerlx-s <lx-s@users.noreply.github.com>
Tue, 19 Dec 2023 13:59:15 +0000 (14:59 +0100)
WinMute/UpdateChecker.cpp

index 977bf3f72f49eb1abb9bd0fa07b26a82215a09d2..a4732b1ae77bbfcf54f6348f4a4a9b27d769232e 100644 (file)
@@ -101,8 +101,8 @@ bool UpdateChecker::ParseVersionFile(
          log.LogError(L"Missing update-file version");
          return false;
       }
-      const auto file_version = json["version"];
-      if (!file_version.is_number() || file_version.get<int>() != 1) {
+      int version = json["version"].get<int>();
+      if (version != 1) {
          log.LogError(L"Update file has incompatible version number");
          return false;
       }