# HG changeset patch # User truebrain # Date 1213198521 0 # Node ID f50864092014c5398d09baa51d5a7c10e798bc98 # Parent e33442a2b23942e8cb8272d02f65c9855129b014 (svn r13474) [NoAI] -Fix: remove the restriction of 10 params per Valuator diff -r e33442a2b239 -r f50864092014 src/ai/api/ai_abstractlist.cpp --- 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 #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]); }