Re-added ImStrdup around string value (#1009)

This commit is contained in:
aMannus 2022-08-02 23:47:39 +02:00 committed by GitHub
parent cec0bc6fca
commit 85c4cd3863
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,7 +111,7 @@ extern "C" void CVar_SetString(const char* name, const char* value) {
cvar = std::make_unique<CVar>(); cvar = std::make_unique<CVar>();
} }
cvar->type = CVarType::String; cvar->type = CVarType::String;
cvar->value.valueStr = value; cvar->value.valueStr = ImStrdup(value);
} }
extern "C" void CVar_RegisterRGBA(const char* name, Color_RGBA8 defaultValue) { extern "C" void CVar_RegisterRGBA(const char* name, Color_RGBA8 defaultValue) {