1
0
forked from GitHub/gf-core

bugfix in the parser which caused some items to be poped in the wrong order if their probability differ with less that 0.5

This commit is contained in:
krasimir
2015-02-26 12:17:59 +00:00
parent 52212d5a76
commit 532647c978

View File

@@ -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