mirror of https://github.com/xemu-project/xemu.git
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
|
@ -794,7 +794,9 @@ static char *tcg_get_arg_str_idx(TCGContext *s, char *buf, int buf_size,
|
||||||
{
|
{
|
||||||
TCGTemp *ts;
|
TCGTemp *ts;
|
||||||
|
|
||||||
|
assert(idx >= 0 && idx < s->nb_temps);
|
||||||
ts = &s->temps[idx];
|
ts = &s->temps[idx];
|
||||||
|
assert(ts);
|
||||||
if (idx < s->nb_globals) {
|
if (idx < s->nb_globals) {
|
||||||
pstrcpy(buf, buf_size, ts->name);
|
pstrcpy(buf, buf_size, ts->name);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue