diff options
| author | krasimir <krasimir@chalmers.se> | 2015-02-26 12:17:59 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2015-02-26 12:17:59 +0000 |
| commit | 532647c97899b911998c635a5b1031ffcdc6275b (patch) | |
| tree | b98efcff3d96cd3a1bab3b127480709a5cecd6ed /src/runtime/c/pgf | |
| parent | 52212d5a7656a4af7460cca1ded367c3e0d62d2f (diff) | |
bugfix in the parser which caused some items to be poped in the wrong order if their probability differ with less that 0.5
Diffstat (limited to 'src/runtime/c/pgf')
| -rw-r--r-- | src/runtime/c/pgf/parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/c/pgf/parser.c b/src/runtime/c/pgf/parser.c index 88b001272..1fdcfda84 100644 --- a/src/runtime/c/pgf/parser.c +++ b/src/runtime/c/pgf/parser.c @@ -522,7 +522,7 @@ cmp_item_prob(GuOrder* self, const void* a, const void* b) prob_t prob1 = item1->inside_prob + item1->conts->outside_prob; prob_t prob2 = item2->inside_prob + item2->conts->outside_prob; - return (int) (prob1-prob2); + return (prob1>prob2) - (prob1<prob2); } static GuOrder |
