mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-26 16:24:24 +02:00
Fixed the default debugger input to strip new lines, fixing the debugger in SDL
This commit is contained in:
@@ -97,9 +97,15 @@ static char *default_input_callback(GB_gameboy_t *gb)
|
||||
size_t size = 0;
|
||||
printf(">");
|
||||
getline(&expression, &size, stdin);
|
||||
|
||||
if (!expression) {
|
||||
return strdup("");
|
||||
}
|
||||
|
||||
size_t length = strlen(expression);
|
||||
if (expression[length - 1] == '\n') {
|
||||
expression[length - 1] = 0;
|
||||
}
|
||||
return expression;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user