mirror of
https://github.com/stascorp/rdpwrap.git
synced 2024-11-23 14:07:18 +00:00
More bug fixes
This commit is contained in:
parent
ac5cb9e480
commit
239cd5fe3f
@ -123,7 +123,7 @@ DWORD INI_FILE::GetFileStringFromNum(DWORD StringNumber, char *RetString, DWORD
|
||||
DWORD EndStringPos = 0;
|
||||
DWORD StringSize = 0;
|
||||
|
||||
if (StringNumber > FileStringsCount) return -1;
|
||||
if (StringNumber > FileStringsCount) return 0;
|
||||
|
||||
for (DWORD i = FileStringsMap[StringNumber]; i < FileSize; i++)
|
||||
{
|
||||
@ -136,7 +136,7 @@ DWORD INI_FILE::GetFileStringFromNum(DWORD StringNumber, char *RetString, DWORD
|
||||
|
||||
StringSize = EndStringPos - FileStringsMap[StringNumber];
|
||||
|
||||
if (Size < StringSize) return -1;
|
||||
if (Size < StringSize) return 0;
|
||||
|
||||
memset(RetString, 0x00, Size);
|
||||
memcpy(RetString, &(FileRaw[FileStringsMap[StringNumber]]), StringSize);
|
||||
|
Loading…
Reference in New Issue
Block a user