1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00

Minor fix in logger.

This commit is contained in:
Sandu Liviu Catalin 2015-11-09 07:36:22 +02:00
parent bcf9d603e7
commit 8c81a0f2b2

View File

@ -410,9 +410,13 @@ template < Uint8 L, bool S > static SQInteger LogBasicMessage(HSQUIRRELVM vm)
if (SQ_FAILED(sq_getstring(vm, -1, &msg))) if (SQ_FAILED(sq_getstring(vm, -1, &msg)))
{ {
_Log->Err("Unable to <retrieve the log message> from the stack"); _Log->Err("Unable to <retrieve the log message> from the stack");
// Pop any pushed values pushed to the stack
sq_settop(vm, top);
// Failed to log the value // Failed to log the value
return 0; return 0;
} }
// Pop any pushed values pushed to the stack
sq_settop(vm, top);
// Log the specified string // Log the specified string
_Log->Message(L, S, "%s", msg); _Log->Message(L, S, "%s", msg);
} }