From: ian Date: Sat, 24 May 2008 00:32:36 +0000 (+0000) Subject: really stop computing polarity when applicable X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=74b6a849f61d7e9f4e30c466c0f57a5ba2a3474e;p=trains.git really stop computing polarity when applicable --- diff --git a/hostside/safety.c b/hostside/safety.c index 1bdfb18..6b9ca79 100644 --- a/hostside/safety.c +++ b/hostside/safety.c @@ -643,7 +643,7 @@ static int fdet_nextseg(TrackLocation *t, TrackAdvanceContext *c, } if (u->know_best_polarity && !t->seg->i->invertible && - u->noninv_tally[ t->backwards ^ u->train_polarity_inverted ^ 1]) { + u->train_polarity_inverted != t->backwards) { /* incompatible, stop now */ u->walk_compute_polarise= 0; }