all repos — mgba @ 348c1fd74148b8c117765637e11c3180ed1c262c

mGBA Game Boy Advance Emulator

Debugger: Fix nargs-style argument passing
Vicki Pfau vi@endrift.com
Thu, 07 Mar 2019 18:53:41 -0800
commit

348c1fd74148b8c117765637e11c3180ed1c262c

parent

e0b1caf48c7f39585fa3d84b7dec18cbf351ca13

1 files changed, 2 insertions(+), 1 deletions(-)

jump to
M src/debugger/cli-debugger.csrc/debugger/cli-debugger.c

@@ -746,10 +746,11 @@ bool nextArgMandatory = false;

if (commands[i].format[arg] == '+') { dvNext = _parseArg(debugger, args, adjusted, lastArg); - --args; + --arg; } else { nextArgMandatory = isupper(commands[i].format[arg]) || (commands[i].format[arg] == '*'); dvNext = _parseArg(debugger, args, adjusted, commands[i].format[arg]); + lastArg = commands[i].format[arg]; } args += adjusted;