--- a/src/ai/api/ai_abstractlist.cpp Wed Jun 11 15:23:32 2008 +0000
+++ b/src/ai/api/ai_abstractlist.cpp Wed Jun 11 15:35:21 2008 +0000
@@ -5,6 +5,7 @@
#include <squirrel.h>
#include "ai_abstractlist.hpp"
#include "../../debug.h"
+#include "../../core/alloc_func.hpp"
/**
* Base class for any AIAbstractList sorter.
@@ -547,8 +548,7 @@
sq_getstackobj(vm, 2, &obj_func);
/* Read the params */
- HSQOBJECT obj_params[10];
- assert(nparam < 10);
+ HSQOBJECT *obj_params = AllocaM(HSQOBJECT, nparam);
for (int i = 0; i < nparam; i++) {
sq_getstackobj(vm, i + 3, &obj_params[i]);
}