[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src/unit ccl_unittype.c
From: |
Martin Renold |
Subject: |
[Stratagus-CVS] stratagus/src/unit ccl_unittype.c |
Date: |
Tue, 07 Oct 2003 09:58:22 -0400 |
CVSROOT: /cvsroot/stratagus
Module name: stratagus
Branch:
Changes by: Martin Renold <address@hidden> 03/10/07 09:58:22
Modified files:
src/unit : ccl_unittype.c
Log message:
fixed segfault on undefined tileset
Patches:
Index: stratagus/src/unit/ccl_unittype.c
diff -u stratagus/src/unit/ccl_unittype.c:1.92
stratagus/src/unit/ccl_unittype.c:1.93
--- stratagus/src/unit/ccl_unittype.c:1.92 Tue Oct 7 08:03:44 2003
+++ stratagus/src/unit/ccl_unittype.c Tue Oct 7 09:58:21 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: ccl_unittype.c,v 1.92 2003/10/07 12:03:44 martinxyz Exp $
+// $Id: ccl_unittype.c,v 1.93 2003/10/07 13:58:21 martinxyz Exp $
//@{
@@ -162,13 +162,13 @@
str = gh_scm2newstr(value, NULL);
i = 0;
if (strcmp(str, "default")) {
- for (; i < TilesetMax; ++i) {
+ for (; i < NumTilesets; ++i) {
if (!strcmp(str,Tilesets[i]->Ident) ||
!strcmp(str,Tilesets[i]->Class)) {
break;
}
}
- if (i == TilesetMax) {
+ if (i == NumTilesets) {
// FIXME: this leaves half initialized unit-type
errl("Unsupported tileset tag", value);
}
- [Stratagus-CVS] stratagus/src/unit ccl_unittype.c,
Martin Renold <=