mirror of https://github.com/bsnes-emu/bsnes.git
Fixed the default debugger input to strip new lines, fixing the debugger in SDL
This commit is contained in:
parent
eb0b642247
commit
1c2af7fa5b
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue