mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-19 18:44:24 +03:00
Add q_last_type() queue function
Analogous to q_cur_type(), asserts that queue indices are within a valid range.
This commit is contained in:
committed by
Matthew Barr
parent
a6383a54a4
commit
cea914e18e
@@ -758,7 +758,7 @@ found_miracle:
|
||||
|
||||
q_skip_forward_to(q, miracle_loc);
|
||||
|
||||
if (q->items[q->end - 1].type == MQE_START) {
|
||||
if (q_last_type(q) == MQE_START) {
|
||||
DEBUG_PRINTF("miracle caused infix to die\n");
|
||||
return 0;
|
||||
}
|
||||
@@ -853,7 +853,7 @@ char roseTestLeftfix(const struct RoseEngine *t, const struct RoseRole *tr,
|
||||
}
|
||||
}
|
||||
|
||||
if (q_cur_loc(q) < loc || q->items[q->end - 1].type != MQE_START) {
|
||||
if (q_cur_loc(q) < loc || q_last_type(q) != MQE_START) {
|
||||
if (left->infix) {
|
||||
if (infixTooOld(q, loc)) {
|
||||
DEBUG_PRINTF("infix %u died of old age\n", ri);
|
||||
|
||||
Reference in New Issue
Block a user