Fix garbage messages in SIB, MD2, and MDC loaders.
This commit is contained in:
@@ -68,6 +68,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/StringUtils.h>
|
||||
|
||||
#include <map>
|
||||
|
||||
@@ -166,14 +167,14 @@ static aiColor3D ReadColor(StreamReaderLE *stream) {
|
||||
}
|
||||
|
||||
static void UnknownChunk(StreamReaderLE * /*stream*/, const SIBChunk &chunk) {
|
||||
char temp[5] = {
|
||||
char temp[4] = {
|
||||
static_cast<char>((chunk.Tag >> 24) & 0xff),
|
||||
static_cast<char>((chunk.Tag >> 16) & 0xff),
|
||||
static_cast<char>((chunk.Tag >> 8) & 0xff),
|
||||
static_cast<char>(chunk.Tag & 0xff), '\0'
|
||||
static_cast<char>(chunk.Tag & 0xff)
|
||||
};
|
||||
|
||||
ASSIMP_LOG_WARN((Formatter::format(), "SIB: Skipping unknown '", temp, "' chunk."));
|
||||
ASSIMP_LOG_WARN((Formatter::format(), "SIB: Skipping unknown '", ai_str_toprintable(temp, 4), "' chunk."));
|
||||
}
|
||||
|
||||
// Reads a UTF-16LE string and returns it at UTF-8.
|
||||
|
||||
Reference in New Issue
Block a user