diff options
| author | krasimir <krasimir@chalmers.se> | 2017-05-16 10:55:00 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2017-05-16 10:55:00 +0000 |
| commit | 08f9f6fbaf39fd852b0ede4173c276fa84bc3e8d (patch) | |
| tree | a372cdc6521cf6bc73bc43617573e16dbc68b4a5 /src | |
| parent | 151184718df340f5c7e96b3e92ba2dd0e4e44b2b (diff) | |
bugfix in the stack handling during lookup
Diffstat (limited to 'src')
| -rw-r--r-- | src/runtime/c/pgf/lookup.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime/c/pgf/lookup.c b/src/runtime/c/pgf/lookup.c index 8741da22c..53a70f36c 100644 --- a/src/runtime/c/pgf/lookup.c +++ b/src/runtime/c/pgf/lookup.c @@ -347,6 +347,10 @@ pgf_lookup_filter(GuBuf* join, PgfMetaId cat_id, GuSeq* counts, GuBuf* stack) if (cat_id == 0) return true; + size_t count = gu_seq_get(counts, size_t, cat_id); + if (count > 0) + return true; + size_t n_stack = gu_buf_length(stack); for (size_t i = 0; i < n_stack; i++) { PgfMetaId id = gu_buf_get(stack, PgfMetaId, i); @@ -355,10 +359,6 @@ pgf_lookup_filter(GuBuf* join, PgfMetaId cat_id, GuSeq* counts, GuBuf* stack) } } gu_buf_push(stack, PgfMetaId, cat_id); - - size_t count = gu_seq_get(counts, size_t, cat_id); - if (count > 0) - return true; size_t pos = 0; size_t maximum = 0; |
