From 574fe851bfceced4797e9f5b8896ea5a4765859f Mon Sep 17 00:00:00 2001 From: leo Date: Sun, 5 Jan 2003 23:49:00 +0000 Subject: Fixed a bug importing pieces with invalid colors. git-svn-id: http://svn.leocad.org/trunk@329 c7d43263-9d01-0410-8a33-9dba5d9f93d6 --- common/library.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/library.cpp b/common/library.cpp index 50f6adb..3da1053 100755 --- a/common/library.cpp +++ b/common/library.cpp @@ -1398,6 +1398,10 @@ static void CreateMesh(group_t* pGroup, lineinfo_t* info, LC_LDRAW_PIECE* piece) for (a = info->next; a; a = a->next) { + // Fix the 'extended colors' that shouldn't be there in the first place. + if ((a->color > 16) && (a->color < 24)) + a->color = 0; + count[a->color][a->type-2]++; vert += a->type; } -- cgit v1.2.3