mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-15 01:05:35 +08:00
Use signed integer format for line number in xbus logging handler
This commit is contained in:
@@ -40,20 +40,20 @@ class QXPlaneMessageHandler
|
||||
char *buffer = new char[64 + localMsg.size() + file.size()];
|
||||
switch (type) {
|
||||
case QtDebugMsg:
|
||||
std::sprintf(buffer, "%s:%u: Debug: %s\n", file.constData(), line, localMsg.constData());
|
||||
std::sprintf(buffer, "%s:%d: Debug: %s\n", file.constData(), line, localMsg.constData());
|
||||
XPLMDebugString(buffer);
|
||||
break;
|
||||
case QtWarningMsg:
|
||||
std::sprintf(buffer, "%s:%u: Warning: %s\n", file.constData(), line, localMsg.constData());
|
||||
std::sprintf(buffer, "%s:%d: Warning: %s\n", file.constData(), line, localMsg.constData());
|
||||
XPLMDebugString(buffer);
|
||||
break;
|
||||
default:
|
||||
case QtCriticalMsg:
|
||||
std::sprintf(buffer, "%s:%u: Error: %s\n", file.constData(), line, localMsg.constData());
|
||||
std::sprintf(buffer, "%s:%d: Error: %s\n", file.constData(), line, localMsg.constData());
|
||||
XPLMDebugString(buffer);
|
||||
break;
|
||||
case QtFatalMsg:
|
||||
std::sprintf(buffer, "%s:%u: Fatal: %s\n", file.constData(), line, localMsg.constData());
|
||||
std::sprintf(buffer, "%s:%d: Fatal: %s\n", file.constData(), line, localMsg.constData());
|
||||
XPLMDebugString(buffer);
|
||||
std::abort();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user