Fix more crossplat issues
This commit is contained in:
parent
b542f59bd1
commit
4096976ea9
@ -291,10 +291,11 @@ void ConvarBase::tf_convar_changed(sdk::IConVar *iconvar, const char *old_string
|
|||||||
ConvarBase::ConvarBase(const char *name, ConvarType type, const ConvarBase *parent) : parent(parent), t(type), next(head), init_complete(false) {
|
ConvarBase::ConvarBase(const char *name, ConvarType type, const ConvarBase *parent) : parent(parent), t(type), next(head), init_complete(false) {
|
||||||
head = this;
|
head = this;
|
||||||
|
|
||||||
if constexpr (doghook_platform_windows())
|
#if doghook_platform_windows()
|
||||||
strcpy_s(internal_name, name);
|
strcpy_s(internal_name, name);
|
||||||
else if constexpr (doghook_platform_linux())
|
#elif doghook_platform_linux()
|
||||||
strcpy(internal_name, name);
|
strcpy(internal_name, name);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Create a tf convar based on this one
|
// Create a tf convar based on this one
|
||||||
tf_convar = new sdk::ConCommandBase;
|
tf_convar = new sdk::ConCommandBase;
|
||||||
|
@ -300,7 +300,12 @@ public:
|
|||||||
|
|
||||||
auto size = strlen(str) + 1;
|
auto size = strlen(str) + 1;
|
||||||
value = new char[size];
|
value = new char[size];
|
||||||
|
|
||||||
|
#if doghook_platform_windows()
|
||||||
strcpy_s(this->value, size, str);
|
strcpy_s(this->value, size, str);
|
||||||
|
#elif doghook_platform_linux()
|
||||||
|
strncpy(this->value, size, str);
|
||||||
|
#endif
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -239,6 +239,7 @@ public:
|
|||||||
|
|
||||||
auto get_verified_user_cmd(u32 sequence_number) -> class VerifiedCmd * {
|
auto get_verified_user_cmd(u32 sequence_number) -> class VerifiedCmd * {
|
||||||
// 03 B7 ? ? ? ? 8D 04 88
|
// 03 B7 ? ? ? ? 8D 04 88
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user