diff --git a/tcg/tcg.c b/tcg/tcg.c index bdd7a672b..30f3aefe6 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -794,7 +794,9 @@ static char *tcg_get_arg_str_idx(TCGContext *s, char *buf, int buf_size, { TCGTemp *ts; + assert(idx >= 0 && idx < s->nb_temps); ts = &s->temps[idx]; + assert(ts); if (idx < s->nb_globals) { pstrcpy(buf, buf_size, ts->name); } else {