1
0
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:
2013-01-07 19:09:38 -05:00
parent b4f6ccaa88
commit d2815f35bf
2 changed files with 43 additions and 82 deletions

View File

@ -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));
}
}