Achievements: Avoid potential crash when parsing malformed responses
This commit is contained in:
parent
587fbf6ca7
commit
c486f6619f
|
@ -256,7 +256,7 @@ public:
|
||||||
data.push_back(0);
|
data.push_back(0);
|
||||||
|
|
||||||
const int error = ParseFunc(this, reinterpret_cast<const char*>(data.data()));
|
const int error = ParseFunc(this, reinterpret_cast<const char*>(data.data()));
|
||||||
initialized = true;
|
initialized = (error == RC_OK);
|
||||||
|
|
||||||
const rc_api_response_t& response = static_cast<T*>(this)->response;
|
const rc_api_response_t& response = static_cast<T*>(this)->response;
|
||||||
if (error != RC_OK)
|
if (error != RC_OK)
|
||||||
|
|
Loading…
Reference in New Issue