Merge pull request #3856 from krishty/fix-sib-string-waste

fixed bloat in SIB importer
pull/3847/head^2
Kim Kulling 2021-05-20 20:24:49 +02:00 committed by GitHub
commit 53563a8624
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -180,8 +180,7 @@ static void UnknownChunk(StreamReaderLE * /*stream*/, const SIBChunk &chunk) {
// Reads a UTF-16LE string and returns it at UTF-8.
static aiString ReadString(StreamReaderLE *stream, uint32_t numWChars) {
if (nullptr == stream || 0 == numWChars) {
static const aiString empty;
return empty;
return aiString();
}
// Allocate buffers (max expansion is 1 byte -> 4 bytes for UTF-8)