mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Add POSIX version of error message in plSecureStream::IRead
This commit is contained in:
@ -93,15 +93,14 @@ void hsDebugMessage (const char* message, long val)
|
|||||||
gHSDebugProc(&s[1]);
|
gHSDebugProc(&s[1]);
|
||||||
else
|
else
|
||||||
#if HS_BUILD_FOR_WIN32
|
#if HS_BUILD_FOR_WIN32
|
||||||
{ OutputDebugString(&s[1]);
|
{
|
||||||
|
OutputDebugString(&s[1]);
|
||||||
OutputDebugString("\n");
|
OutputDebugString("\n");
|
||||||
}
|
}
|
||||||
#elif HS_BUILD_FOR_UNIX
|
|
||||||
{ fprintf(stderr, "%s\n", &s[1]);
|
|
||||||
// hsThrow(&s[1]);
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
hsThrow(&s[1]);
|
{
|
||||||
|
fprintf(stderr, "%s\n", &s[1]);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -48,6 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#include "hsSTLStream.h"
|
#include "hsSTLStream.h"
|
||||||
|
|
||||||
#if !HS_BUILD_FOR_WIN32
|
#if !HS_BUILD_FOR_WIN32
|
||||||
|
#include <errno.h>
|
||||||
#define INVALID_HANDLE_VALUE 0
|
#define INVALID_HANDLE_VALUE 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -325,9 +326,10 @@ uint32_t plSecureStream::IRead(uint32_t bytes, void* buffer)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// TODO: errno equivalent for *nix
|
|
||||||
#if HS_BUILD_FOR_WIN32
|
#if HS_BUILD_FOR_WIN32
|
||||||
hsDebugMessage("Error on Windows read", GetLastError());
|
hsDebugMessage("Error on Windows read", GetLastError());
|
||||||
|
#else
|
||||||
|
hsDebugMessage("Error on POSIX read", errno);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user