mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
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:
parent
c0ad3001bf
commit
7f6f0ae5b9
1 changed files with 2 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue