Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix string termination for UNICODE.
  • Loading branch information
fancycode committed Sep 20, 2016
commit d718478cfccdfc45ec2b6655727fce57fff3602e
4 changes: 3 additions & 1 deletion MemoryModule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,9 @@ MemoryLoadStringExW(HMEMORYMODULE module, UINT id, LPWSTR buffer, int maxsize, W

size = data->Length;
if (size >= maxsize) {
size = maxsize - 1;
size = maxsize;
} else {
buffer[size] = 0;
}
wcsncpy(buffer, data->NameString, size);
return size;
Expand Down