diff options
| author | Ladislav Zezula <zezula@volny.cz> | 2025-10-11 09:07:22 +0200 |
|---|---|---|
| committer | Ladislav Zezula <zezula@volny.cz> | 2025-10-11 09:07:22 +0200 |
| commit | b62de3c83fc146c4e8a05bde15d39e19588c28a4 (patch) | |
| tree | 7bf081d5c6f342b304abc576f5ed380037800b3e | |
| parent | d1aef907ffd8ea6f6ce04c5495b1cd350afc932a (diff) | |
Fixed issue #400
| -rw-r--r-- | src/StormCommon.h | 4 | ||||
| -rwxr-xr-x | test/StormTest.cpp | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/StormCommon.h b/src/StormCommon.h index 7f71452..cefb92c 100644 --- a/src/StormCommon.h +++ b/src/StormCommon.h @@ -239,8 +239,8 @@ DWORD SMemStrToBin(const XCHAR * szString, void * pvBinary, size_t cbBinary, siz BYTE StringByte0 = (BYTE)szString[0];
BYTE StringByte1 = (BYTE)szString[1];
- // Each character must be within the range of 0x80
- if(StringByte0 > 0x80 || StringByte1 > 0x80)
+ // Each character must be within the range of 0x00-0x7F
+ if(StringByte0 >= 0x80 || StringByte1 >= 0x80)
return ERROR_INVALID_PARAMETER;
if(SMemCharToByte[StringByte0] == 0xFF || SMemCharToByte[StringByte1] == 0xFF)
return ERROR_INVALID_PARAMETER;
diff --git a/test/StormTest.cpp b/test/StormTest.cpp index eb57ebf..e3a210e 100755 --- a/test/StormTest.cpp +++ b/test/StormTest.cpp @@ -1,4 +1,4 @@ -/*****************************************************************************/
+/*****************************************************************************/
/* StormTest.cpp Copyright (c) Ladislav Zezula 2003 */
/*---------------------------------------------------------------------------*/
/* Test module for StormLib */
@@ -3955,12 +3955,13 @@ static DWORD TestUtf8Conversions(const BYTE * szTestString, const TCHAR * szList static void Test_PlayingSpace()
{
+/*
HANDLE hMpq;
HANDLE hFile;
LPBYTE pbData;
DWORD dwFileSize = 529298;
DWORD dwBytesRead = 0;
-/*
+
if(SFileOpenArchive(_T("e:\\2.mpq"), 0, 0, &hMpq))
{
if(SFileOpenFileEx(hMpq, "(listfile)", 0, &hFile))
|
