mirror of
https://github.com/vxcontrol/MemoryModule.git
synced 2026-07-20 10:13:40 -04:00
MSVC again - "static const" can not be used as array size.
This commit is contained in:
+2
-1
@@ -835,7 +835,7 @@ static PIMAGE_RESOURCE_DIRECTORY_ENTRY _MemorySearchResourceEntry(
|
||||
#else
|
||||
// Resource names are always stored using 16bit characters, need to
|
||||
// convert string we search for.
|
||||
static const size_t MAX_LOCAL_KEY_LENGTH = 2048;
|
||||
#define MAX_LOCAL_KEY_LENGTH 2048
|
||||
// In most cases resource names are short, so optimize for that by
|
||||
// using a pre-allocated array.
|
||||
wchar_t _searchKeySpace[MAX_LOCAL_KEY_LENGTH+1];
|
||||
@@ -884,6 +884,7 @@ static PIMAGE_RESOURCE_DIRECTORY_ENTRY _MemorySearchResourceEntry(
|
||||
if (searchKeyLen > MAX_LOCAL_KEY_LENGTH) {
|
||||
free(_searchKey);
|
||||
}
|
||||
#undef MAX_LOCAL_KEY_LENGTH
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user