summaryrefslogtreecommitdiff
path: root/tcg
diff options
context:
space:
mode:
authorStefan Weil <weil@mail.berlios.de>2011-09-17 22:00:30 +0200
committerBlue Swirl <blauwirbel@gmail.com>2011-10-01 06:11:23 +0000
commit7f6f0ae5b95adfa76e10eabe2c34424a955fd10c (patch)
treeaa15816439e2eeb63f4344850f75bd669737cfe4 /tcg
parentc0ad3001bf12292b137b05e1c4643f31c6b0a727 (diff)
tcg: Add some assertions
Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'tcg')
-rw-r--r--tcg/tcg.c2
1 files changed, 2 insertions, 0 deletions
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 {