Now using posix strdrup on non-msvc builds.

This commit is contained in:
Kenix3 2022-08-02 23:20:17 -04:00
parent 8c9d067657
commit 6190388164

View File

@ -109,7 +109,11 @@ 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;
#ifdef _MSC_VER
cvar->value.valueStr = _strdup(value); cvar->value.valueStr = _strdup(value);
#else
cvar->value.valueStr = strdup(value);
#endif
} }
extern "C" void CVar_RegisterRGBA(const char* name, Color_RGBA8 defaultValue) { extern "C" void CVar_RegisterRGBA(const char* name, Color_RGBA8 defaultValue) {