diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2006-10-17 19:57:25 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2006-10-17 19:57:25 +0000 |
commit | 0c6c8d5f1c7bfbedc0acbf34a5a9701bdad29841 (patch) | |
tree | 28cc6c1f8f772fce63a2b7721b01069ebb99ef3f | |
parent | 1c1c7fb3610026345e956ad7845e101802f72033 (diff) |
new assertions - one of which is currently failing with arbfslight.c
-rw-r--r-- | src/mesa/shader/grammar/grammar.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/shader/grammar/grammar.c b/src/mesa/shader/grammar/grammar.c index 0b767c02cd..8bfff3ec42 100644 --- a/src/mesa/shader/grammar/grammar.c +++ b/src/mesa/shader/grammar/grammar.c @@ -2410,6 +2410,7 @@ static match_result match (dict *di, const byte *text, unsigned int *index, rule } else if (result == mr_matched) { + assert(ind > 0); if (barray_push (ba, sp->m_emits, text[ind - 1], save_ind, &ctx) || barray_append (ba, &array)) { @@ -2469,6 +2470,7 @@ static match_result match (dict *di, const byte *text, unsigned int *index, rule if (status == mr_matched) { if (sp->m_emits) + assert(ind > 0); if (barray_push (ba, sp->m_emits, text[ind - 1], save_ind, &ctx)) { free_regbyte_ctx_stack (ctx, *rbc); @@ -2629,6 +2631,7 @@ static match_result fast_match (dict *di, const byte *text, unsigned int *index, { if (sp->m_emits != NULL) { + assert(ind > 0); if (emit_push (sp->m_emits, _BP->_F + _P, text[ind - 1], save_ind, &ctx)) { free_regbyte_ctx_stack (ctx, *rbc); @@ -2686,6 +2689,7 @@ static match_result fast_match (dict *di, const byte *text, unsigned int *index, if (status == mr_matched) { if (sp->m_emits != NULL) + assert(ind > 0); if (emit_push (sp->m_emits, _BP->_F + _P, text[ind - 1], save_ind, &ctx)) { free_regbyte_ctx_stack (ctx, *rbc); |