Module dpmodel: Change committed
warp at icculus.org
warp at icculus.org
Wed Dec 10 22:41:43 EST 2003
Commiter : warp
CVSROOT : /cvs/cvsroot/twilight
Module : dpmodel
Commit time: 2003-12-11 03:41:43 UTC
Log message:
Copying the shader name lowercases everything, but the comparison to found shaders is case sensitive.
There were a /LOT/ of identical shader entries.
Modified files:
dpmodel.c
------=MIME.dd7c13bfb626fe1b7ff9c71803bb382a
Content-Type: text/plain; name="dpmodel.20031211.034143.warp.diff"
Content-Disposition: attachment; filename="dpmodel.20031211.034143.warp.diff"
Content-Transfer-Encoding: 8bit
Index: dpmodel/dpmodel.c
diff -u dpmodel/dpmodel.c:1.3 dpmodel/dpmodel.c:1.4
--- dpmodel/dpmodel.c:1.3 Sat Nov 29 15:20:58 2003
+++ dpmodel/dpmodel.c Wed Dec 10 22:41:33 2003
@@ -615,7 +615,7 @@
int parsetriangles(void)
{
unsigned char line[1024];
- int current = 0, i;
+ int current = 0, i, found = 0;
double org[3], normal[3];
double d;
int vbonenum;
@@ -635,11 +635,15 @@
break;
if (current == 0)
{
- for (i = 0;i < numshaders;i++)
- if (!strcmp(shaders[i], line))
+ found = 0;
+ for (i = 0;i < numshaders;i++) {
+ if (!strcasecmp(shaders[i], line)) {
+ found = 1;
break;
+ }
+ }
triangles[numtriangles].shadernum = i;
- if (i == numshaders)
+ if (!found)
{
cleancopyname(shaders[i], line, MAX_NAME);
numshaders++;
More information about the twilight-commits
mailing list