summaryrefslogtreecommitdiff
path: root/common/library.cpp
diff options
context:
space:
mode:
authorleo2003-01-05 23:49:00 +0000
committerleo2003-01-05 23:49:00 +0000
commit574fe851bfceced4797e9f5b8896ea5a4765859f (patch)
tree7bb625dd0fd345abb47d0b596d2fa81b9afdf084 /common/library.cpp
parent20dea908eac3647e8081a2389f61a19a6d002cc1 (diff)
Fixed a bug importing pieces with invalid colors.
git-svn-id: http://svn.leocad.org/trunk@329 c7d43263-9d01-0410-8a33-9dba5d9f93d6
Diffstat (limited to 'common/library.cpp')
-rwxr-xr-xcommon/library.cpp4
1 files changed, 4 insertions, 0 deletions
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;
}