diff --git a/gmlmip_stub.cc b/gmlmip_stub.cc index bf83b1846a2283c249bc12ce94718f297576f8a4..e0599076d2d0ae09ac4f68c75a4dad46d7b0a46d 100644 --- a/gmlmip_stub.cc +++ b/gmlmip_stub.cc @@ -47,7 +47,7 @@ static CAMLprim value pair2caml(const int& t) { CAMLlocal1( abc ); abc = caml_alloc(2, 0); bool neg = t < 0; - Store_field( abc, 0, Val_int(neg ?(-t) : t)); + Store_field( abc, 0, Val_int((neg ?(-t) : t) - 1)); Store_field( abc, 1, Val_bool(!neg)); return abc; } @@ -74,7 +74,7 @@ CAMLprim value gmlRules_stub(value modalities) { modvec.push_back(make_pair(make_pair( Bool_val(vpos), Int_val(vcnt)), - Int_val(vformula))); + 1+Int_val(vformula))); block = Field(block, 1); } // Do one rule step and save result in rulevec