IFC Reading: Fix opening reading.

This commit is contained in:
Ben Sewell
2022-01-17 15:49:11 +00:00
parent 41cfcc7d16
commit 65f2353105
5 changed files with 389 additions and 75 deletions
+5 -4
View File
@@ -388,15 +388,16 @@ void DefaultLogger::WriteToStreams(const char *message, ErrorSeverity ErrorSev)
ai_assert(nullptr != message);
// Check whether this is a repeated message
if (!::strncmp(message, lastMsg, lastLen - 1)) {
auto thisLen = ::strlen(message);
if (thisLen == lastLen - 1 && !::strncmp(message, lastMsg, lastLen - 1)) {
if (!noRepeatMsg) {
noRepeatMsg = true;
message = "Skipping one or more lines with the same contents\n";
} else
return;
}
return;
} else {
// append a new-line character to the message to be printed
lastLen = ::strlen(message);
lastLen = thisLen;
::memcpy(lastMsg, message, lastLen + 1);
::strcat(lastMsg + lastLen, "\n");