mirror of https://github.com/mgba-emu/mgba.git
Debugger: Reject traces with negative trace amounts (fixes #2900)
This commit is contained in:
parent
078ce85774
commit
5a94780871
|
@ -726,10 +726,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