forked from GitHub/gf-core
pgf_category_prob should return INFINITY for non-existant categories
This commit is contained in:
@@ -361,7 +361,7 @@ prob_t pgf_category_prob(PgfDB *db, PgfRevision revision,
|
|||||||
ref<PgfAbsCat> abscat =
|
ref<PgfAbsCat> abscat =
|
||||||
namespace_lookup(pgf->abstract.cats, catname);
|
namespace_lookup(pgf->abstract.cats, catname);
|
||||||
if (abscat == 0) {
|
if (abscat == 0) {
|
||||||
return 0;
|
return INFINITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
return abscat->prob;
|
return abscat->prob;
|
||||||
|
|||||||
Reference in New Issue
Block a user