Fix a potential single byte overflow
This commit is contained in:
parent
2e4a638077
commit
e35c22d405
@ -132,7 +132,7 @@ static const char *value_to_string(GB_gameboy_t *gb, uint16_t value, bool prefer
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Avoid overflow */
|
/* Avoid overflow */
|
||||||
if (symbol && strlen(symbol->name) > 240) {
|
if (symbol && strlen(symbol->name) >= 240) {
|
||||||
symbol = NULL;
|
symbol = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -172,7 +172,7 @@ static const char *debugger_value_to_string(GB_gameboy_t *gb, value_t value, boo
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Avoid overflow */
|
/* Avoid overflow */
|
||||||
if (symbol && strlen(symbol->name) > 240) {
|
if (symbol && strlen(symbol->name) >= 240) {
|
||||||
symbol = NULL;
|
symbol = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user