From 8b57ca1cef5cda0301f51651577444dff1ec5c4f Mon Sep 17 00:00:00 2001 From: Denys Duchier Date: Thu, 28 Jun 2012 14:04:41 +0200 Subject: [PATCH] copy-and-paste bug in dimensioning a dynamic array --- library/gecode/gecode_yap.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/gecode/gecode_yap.cc b/library/gecode/gecode_yap.cc index 385635bbe..02283d31a 100644 --- a/library/gecode/gecode_yap.cc +++ b/library/gecode/gecode_yap.cc @@ -1047,7 +1047,7 @@ extern "C" YAP_Term result = YAP_ARG1; GenericSpace* space = gecode_Space_from_term(YAP_ARG2); SetVar x = gecode_SetVar_from_term(space, YAP_ARG3); - DYNARRAY(YAP_Term,elems,x.glbSize()); + DYNARRAY(YAP_Term,elems,x.lubSize()); SetVarLubValues it(x); int n = 0; while (it()) { elems[n] = YAP_MkIntTerm(it.val()); ++it; ++n; } @@ -1061,7 +1061,7 @@ extern "C" YAP_Term result = YAP_ARG1; GenericSpace* space = gecode_Space_from_term(YAP_ARG2); SetVar x = gecode_SetVar_from_term(space, YAP_ARG3); - DYNARRAY(YAP_Term,elems,x.glbSize()); + DYNARRAY(YAP_Term,elems,x.unknownSize()); SetVarUnknownValues it(x); int n = 0; while (it()) { elems[n] = YAP_MkIntTerm(it.val()); ++it; ++n; }