From c486f6619ff9a01031472350266610c0899dedc6 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Tue, 4 Oct 2022 00:45:25 +1000 Subject: [PATCH] Achievements: Avoid potential crash when parsing malformed responses --- src/frontend-common/achievements.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend-common/achievements.cpp b/src/frontend-common/achievements.cpp index f67d5eb49..db56bb246 100644 --- a/src/frontend-common/achievements.cpp +++ b/src/frontend-common/achievements.cpp @@ -256,7 +256,7 @@ public: data.push_back(0); const int error = ParseFunc(this, reinterpret_cast(data.data())); - initialized = true; + initialized = (error == RC_OK); const rc_api_response_t& response = static_cast(this)->response; if (error != RC_OK)