fixed delete bug in printt -- when skipping file and line the

deleted pointer was wrong.
This commit is contained in:
crs 2002-06-04 11:03:34 +00:00
parent 3b872bb727
commit e409c83ef9
1 changed files with 3 additions and 2 deletions

View File

@ -97,12 +97,13 @@ void CLog::printt(const char* file, int line,
buffer[pad - 1] = ' ';
// discard file and line if priority < 0
char* message = buffer;
if (priority < 0) {
buffer += pad - g_priorityPad;
message += pad - g_priorityPad;
}
// output buffer
output(priority, buffer);
output(priority, message);
// clean up
if (buffer != stack)