8000 MSVC again - "static const" can not be used as array size. · fancycode/MemoryModule@5ce3707 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5ce3707

Browse files
committed
MSVC again - "static const" can not be used as array size.
1 parent d9dcc0e commit 5ce3707

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

MemoryModule.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ static PIMAGE_RESOURCE_DIRECTORY_ENTRY _MemorySearchResourceEntry(
835835
#else
836836
// Resource names are always stored using 16bit characters, need to
837837
// convert string we search for.
838-
static const size_t MAX_LOCAL_KEY_LENGTH = 2048;
838+
#define MAX_LOCAL_KEY_LENGTH 2048
839839
// In most cases resource names are short, so optimize for that by
840840
// using a pre-allocated array.
841841
wchar_t _searchKeySpace[MAX_LOCAL_KEY_LENGTH+1];
@@ -884,6 +884,7 @@ static PIMAGE_RESOURCE_DIRECTORY_ENTRY _MemorySearchResourceEntry(
884884
if (searchKeyLen > MAX_LOCAL_KEY_LENGTH) {
885885
free(_searchKey);
886886
}
887+
#undef MAX_LOCAL_KEY_LENGTH
887888
#endif
888889
}
889890

0 commit comments

Comments
 (0)
0