Silently ignoring empty lines

This commit is contained in:
Lior Halphon 2016-04-08 01:53:21 +03:00
parent 1069637e45
commit f448865b8a
2 changed files with 4 additions and 1 deletions

View File

@ -309,7 +309,7 @@ static uint32_t rgbEncode(GB_gameboy_t *gb, unsigned char r, unsigned char g, un
- (IBAction)consoleInput:(NSTextField *)sender {
NSString *line = [sender stringValue];
if ([line isEqualToString:@""]) {
if ([line isEqualToString:@""] && lastConsoleInput) {
line = lastConsoleInput;
}
else if (line) {

View File

@ -610,6 +610,9 @@ next_command:
gb->debug_next_command = false;
gb->debug_fin_command = false;
input = gb->input_callback(gb);
if (!input[0]) {
goto next_command;
}
char *command_string = input;
char *arguments = strchr(input, ' ');