correctly break on end of qDebug message in LogDisplay

This commit is contained in:
Stephen Birarda 2013-07-16 12:00:14 -07:00
parent 51d1e6ae80
commit 063094f96c

View file

@ -97,8 +97,9 @@ void LogDisplay::addMessage(const char* ptr) {
fprintf(_stream, "%s", ptr);
}
while (*ptr != '\0') {
while (true) {
// process the characters
bool isEndOfMessage = (*ptr == '\0');
char c = *ptr++;
if (c == '\t') {
@ -150,6 +151,10 @@ void LogDisplay::addMessage(const char* ptr) {
_writeLineStartPos = _writePos;
_writtenInLine = 0;
}
if (isEndOfMessage) {
break;
}
}
pthread_mutex_unlock(& _mutex);