mirror of https://github.com/mgba-emu/mgba.git
Debugger: Reject traces with negative trace amounts (fixes #2900)
This commit is contained in:
parent
3a59d9cb83
commit
622c2491b9
|
@ -809,10 +809,14 @@ static void _listWatchpoints(struct CLIDebugger* debugger, struct CLIDebugVector
|
|||
}
|
||||
|
||||
static void _trace(struct CLIDebugger* debugger, struct CLIDebugVector* dv) {
|
||||
if (!dv || dv->type != CLIDV_INT_TYPE) {
|
||||
if (!dv) {
|
||||
debugger->backend->printf(debugger->backend, "%s\n", ERROR_MISSING_ARGS);
|
||||
return;
|
||||
}
|
||||
if (dv->type != CLIDV_INT_TYPE || dv->intValue < 0) {
|
||||
debugger->backend->printf(debugger->backend, "%s\n", ERROR_INVALID_ARGS);
|
||||
return;
|
||||
}
|
||||
|
||||
debugger->traceRemaining = dv->intValue;
|
||||
if (debugger->traceVf) {
|
||||
|
|
Loading…
Reference in New Issue