From 8416a86b6deceab44f4ebb446838976d53637149 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sat, 24 Jan 2015 18:45:56 +0100 Subject: [PATCH] VertexLoaderBase: fix crash on invalid formats --- Source/Core/VideoCommon/VertexLoaderBase.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/Source/Core/VideoCommon/VertexLoaderBase.cpp b/Source/Core/VideoCommon/VertexLoaderBase.cpp index c0e8e533df..b17731509d 100644 --- a/Source/Core/VideoCommon/VertexLoaderBase.cpp +++ b/Source/Core/VideoCommon/VertexLoaderBase.cpp @@ -77,22 +77,15 @@ void VertexLoaderBase::AppendToString(std::string *dest) const static const char *posMode[4] = { "Inv", - "Dir", - "I8", - "I16", + "Dir", "I8", "I16", }; - static const char *posFormats[5] = { + static const char *posFormats[8] = { "u8", "s8", "u16", "s16", "flt", + "Inv", "Inv", "Inv", }; static const char *colorFormat[8] = { - "565", - "888", - "888x", - "4444", - "6666", - "8888", - "Inv", - "Inv", + "565", "888", "888x", "4444", "6666", "8888", + "Inv", "Inv", }; dest->append(StringFromFormat("%ib skin: %i P: %i %s-%s ",