[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src/clone groups.c
From: |
Nehal Mistry |
Subject: |
[Stratagus-CVS] stratagus/src/clone groups.c |
Date: |
Fri, 07 Nov 2003 19:46:33 -0500 |
CVSROOT: /cvsroot/stratagus
Module name: stratagus
Branch:
Changes by: Nehal Mistry <address@hidden> 03/11/07 19:46:33
Modified files:
src/clone : groups.c
Log message:
fix DebugCheck if number of units selected > NumUnitsPerGroup
Patches:
Index: stratagus/src/clone/groups.c
diff -u stratagus/src/clone/groups.c:1.23 stratagus/src/clone/groups.c:1.24
--- stratagus/src/clone/groups.c:1.23 Sun Nov 2 21:19:33 2003
+++ stratagus/src/clone/groups.c Fri Nov 7 19:46:33 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: groups.c,v 1.23 2003/11/03 02:19:33 nehalmistry Exp $
+// $Id: groups.c,v 1.24 2003/11/08 00:46:33 nehalmistry Exp $
//@{
@@ -96,7 +96,7 @@
char* ref;
CLprintf(file, "\n;;; -----------------------------------------\n");
- CLprintf(file, ";;; MODULE: groups $Id: groups.c,v 1.23 2003/11/03
02:19:33 nehalmistry Exp $\n\n");
+ CLprintf(file, ";;; MODULE: groups $Id: groups.c,v 1.24 2003/11/08
00:46:33 nehalmistry Exp $\n\n");
for (g = 0; g < NUM_GROUPS; ++g) {
CLprintf(file, "(group %d %d '(", g, Groups[g].NumUnits);
@@ -192,7 +192,11 @@
*/
global void SetGroup(Unit** units, int nunits, int num)
{
- DebugCheck(num > NUM_GROUPS || nunits > NumUnitsPerGroup);
+ DebugCheck(num > NUM_GROUPS);
+
+ if (nunits > NumUnitsPerGroup) {
+ nunits = NumUnitsPerGroup;
+ }
ClearGroup(num);
AddToGroup(units, nunits, num);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Stratagus-CVS] stratagus/src/clone groups.c,
Nehal Mistry <=