mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 07:36:23 +00:00
Core/Misc: update g3dlite lib (#2904)
* Core/Misc: update g3dlite lib * update Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com>
This commit is contained in:
8
deps/g3dlite/source/RegistryUtil.cpp
vendored
8
deps/g3dlite/source/RegistryUtil.cpp
vendored
@@ -11,7 +11,7 @@
|
||||
#include "G3D/platform.h"
|
||||
|
||||
// This file is only used on Windows
|
||||
#ifdef G3D_WIN32
|
||||
#ifdef G3D_WINDOWS
|
||||
|
||||
#include "G3D/RegistryUtil.h"
|
||||
#include "G3D/System.h"
|
||||
@@ -24,7 +24,6 @@
|
||||
# define HKEY_PERFORMANCE_NLSTEXT ((HKEY)((LONG)0x80000060))
|
||||
# endif
|
||||
#endif
|
||||
|
||||
namespace G3D {
|
||||
|
||||
// static helpers
|
||||
@@ -256,7 +255,8 @@ bool RegistryUtil::writeString(const std::string& key, const std::string& value,
|
||||
debugAssert(result == ERROR_SUCCESS || result == ERROR_FILE_NOT_FOUND);
|
||||
|
||||
if (result == ERROR_SUCCESS) {
|
||||
result = RegSetValueExA(openKey, value.c_str(), 0, REG_SZ, reinterpret_cast<const BYTE*>(data.c_str()), (data.size() + 1));
|
||||
alwaysAssertM(data.size() < 0xFFFFFFFE, "String too long");
|
||||
result = RegSetValueExA(openKey, value.c_str(), 0, REG_SZ, reinterpret_cast<const BYTE*>(data.c_str()), (int)(data.size() + 1));
|
||||
debugAssertM(result == ERROR_SUCCESS, "Could not write registry key value.");
|
||||
|
||||
RegCloseKey(openKey);
|
||||
@@ -296,4 +296,4 @@ static HKEY getRootKeyFromString(const char* str, size_t length) {
|
||||
|
||||
} // namespace G3D
|
||||
|
||||
#endif // G3D_WIN32
|
||||
#endif // G3D_WINDOWS
|
||||
|
||||
Reference in New Issue
Block a user