Skip to content

Commit

Permalink
MSVC again - "static const" can not be used as array size.
Browse files Browse the repository at this point in the history
  • Loading branch information
fancycode committed Sep 19, 2016
1 parent d9dcc0e commit 5ce3707
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion MemoryModule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -884,6 +884,7 @@ static PIMAGE_RESOURCE_DIRECTORY_ENTRY _MemorySearchResourceEntry(
if (searchKeyLen > MAX_LOCAL_KEY_LENGTH) {
free(_searchKey);
}
#undef MAX_LOCAL_KEY_LENGTH
#endif
}

Expand Down

0 comments on commit 5ce3707

Please sign in to comment.