From 7f6f0ae5b95adfa76e10eabe2c34424a955fd10c Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 17 Sep 2011 22:00:30 +0200 Subject: tcg: Add some assertions Signed-off-by: Stefan Weil Signed-off-by: Blue Swirl --- tcg/tcg.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tcg') diff --git a/tcg/tcg.c b/tcg/tcg.c index bdd7a67..30f3aef 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 { -- cgit v1.1