1
0
Fork 0

Fix zero termination

bug only affected debug build, see #396
This commit is contained in:
mrgreywater 2015-09-21 14:01:00 +02:00
parent 00c66d1bd1
commit 441f6c7a0a
1 changed files with 1 additions and 3 deletions

View File

@ -403,8 +403,6 @@ bool MemGetPageRights(uint Address, char* Rights)
bool MemPageRightsToString(DWORD Protect, char* Rights)
{
memset(Rights, 0, RIGHTS_STRING_SIZE);
switch(Protect & 0xFF)
{
case PAGE_NOACCESS:
@ -433,7 +431,7 @@ bool MemPageRightsToString(DWORD Protect, char* Rights)
break;
}
Rights[4] = ((Protect & PAGE_GUARD) == PAGE_GUARD) ? 'G' : '-';
strcpy_s(Rights + 4, RIGHTS_STRING_SIZE - 4, ((Protect & PAGE_GUARD) == PAGE_GUARD) ? "G" : "-");
// Rights[5] = ((Protect & PAGE_NOCACHE) == PAGE_NOCACHE) ? '' : '-';
// Rights[6] = ((Protect & PAGE_WRITECOMBINE) == PAGE_GUARD) ? '' : '-';