Add ai_str_toprintable; fixed garbage messages in HMP, MDL, Q3D loaders.

- ai_str_toprintable: See docs in StringUtils.h.
- HMP, MDL, Q3D: In particular, newlines in binary data were complicating logging.
This commit is contained in:
Jason C
2021-05-04 20:33:16 -04:00
parent c8ad8c6017
commit a9fb1e56ae
4 changed files with 32 additions and 8 deletions
+1 -1
View File
@@ -252,7 +252,7 @@ void MDLImporter::InternReadFile(const std::string &pFile,
} else {
// print the magic word to the log file
throw DeadlyImportError("Unknown MDL subformat ", pFile,
". Magic word (", std::string((char *)&iMagicWord, 4), ") is not known");
". Magic word (", ai_str_toprintable((const char *)&iMagicWord, sizeof(iMagicWord)), ") is not known");
}
// Now rotate the whole scene 90 degrees around the x axis to convert to internal coordinate system