--- hatari/src/debug/debugui.c 2019/04/09 08:58:05 1.1.1.10 +++ hatari/src/debug/debugui.c 2019/04/09 08:59:20 1.1.1.11 @@ -13,6 +13,7 @@ const char DebugUI_fileid[] = "Hatari de #include #include #include +#include #include "config.h" @@ -151,7 +152,7 @@ static void DebugUI_PrintValue(Uint32 va ones = false; for (bit = 31; bit >= 0; bit--) { - one = value & (1<= ARRAY_SIZE(psArgs)) + { + fprintf(stderr, "Error: too many arguments (currently up to %d supported)\n", + ARRAY_SIZE(psArgs)); + retval = DEBUGGER_CMDCONT; + } + else + { + /* ... and execute the function */ + retval = debugCommand[i].pFunction(nArgc, psArgs); + } /* Save commando string if it can be repeated */ if (retval == DEBUGGER_CMDCONT) { @@ -809,8 +820,12 @@ static void DebugUI_FreeCommand(char *in */ static char *DebugUI_GetCommand(char *input) { + /* We need this indirection for libedit's rl_readline_name which is + * not declared as "const char *" (i.e. this is necessary for macOS) */ + static char hatari_readline_name[] = "Hatari"; + /* Allow conditional parsing of the ~/.inputrc file. */ - rl_readline_name = "Hatari"; + rl_readline_name = hatari_readline_name; /* Tell the completer that we want a crack first. */ rl_attempted_completion_function = DebugUI_Completion;