sim-card
/
qemu
Archived
10
0
Fork 0

tcg: Add some assertions

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Stefan Weil 2011-09-17 22:00:30 +02:00 committed by Blue Swirl
parent c0ad3001bf
commit 7f6f0ae5b9
1 changed files with 2 additions and 0 deletions

View File

@ -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 {