From fc4176085f196d7156d399fcb347bc8ae06f1d5d Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 9 Jan 2011 01:30:55 +0000 Subject: [PATCH] hostside: movpos: fix fundamental logic error in change_needed (!) --- hostside/movpos.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hostside/movpos.c b/hostside/movpos.c index 224202c..7f31f07 100644 --- a/hostside/movpos.c +++ b/hostside/movpos.c @@ -752,7 +752,8 @@ static int change_needed(const MovFeatInfo *feati, MovPosComb startpoint, MovPosComb target) { int r; r= !SOMEP(startpoint) || - (target - startpoint) / feati->weight % feati->posns; + (target / feati->weight) % feati->posns - + (startpoint / feati->weight) % feati->posns; if (DEBUGP(movpos,eval)) DPRINTFA(" { %s:%s(%d*%d) %d..%d => %d }", feature_method(feati)->pname, feati->pname, -- 2.30.2