From 239cd5fe3fe4886546ce61f868542b0ad48e5a2c Mon Sep 17 00:00:00 2001 From: binarymaster Date: Wed, 10 Dec 2014 02:59:13 +0300 Subject: [PATCH] More bug fixes --- src-x86-x64-Fusix/IniFile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src-x86-x64-Fusix/IniFile.cpp b/src-x86-x64-Fusix/IniFile.cpp index b914a8e..2c5f1ef 100644 --- a/src-x86-x64-Fusix/IniFile.cpp +++ b/src-x86-x64-Fusix/IniFile.cpp @@ -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);