mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Replace plasmalog with a better debug log
Plasmalog.txt is now plasmadbg.log. This allows us to view the log inside the game, flush to the debugger output window, and have the logfile. The plan is to redirect key leak reports to this log in a future commit.
This commit is contained in:
@ -714,17 +714,13 @@ uint32_t hsUNIXStream::Read(uint32_t bytes, void* buffer)
|
||||
{
|
||||
if (!fRef || !bytes)
|
||||
return 0;
|
||||
int numItems = ::fread(buffer, 1 /*size*/, bytes /*count*/, fRef);
|
||||
size_t numItems = ::fread(buffer, 1 /*size*/, bytes /*count*/, fRef);
|
||||
fBytesRead += numItems;
|
||||
fPosition += numItems;
|
||||
if ((unsigned)numItems < bytes) {
|
||||
if (feof(fRef)) {
|
||||
// EOF ocurred
|
||||
char str[128];
|
||||
sprintf(str, "Hit EOF on UNIX Read, only read %d out of requested %d bytes\n", numItems, bytes);
|
||||
hsDebugMessage(str, 0);
|
||||
}
|
||||
else {
|
||||
if (numItems < bytes)
|
||||
{
|
||||
if (!feof(fRef))
|
||||
{
|
||||
hsDebugMessage("Error on UNIX Read", ferror(fRef));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user