diff options
Diffstat (limited to 'apps/plugins/chip8.c')
-rw-r--r-- | apps/plugins/chip8.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/plugins/chip8.c b/apps/plugins/chip8.c index 3bdf95093a..7435518855 100644 --- a/apps/plugins/chip8.c +++ b/apps/plugins/chip8.c | |||
@@ -1329,7 +1329,7 @@ static bool chip8_init(const char* file) | |||
1329 | int i; | 1329 | int i; |
1330 | 1330 | ||
1331 | fd = rb->open(file, O_RDONLY); | 1331 | fd = rb->open(file, O_RDONLY); |
1332 | if (fd==-1) { | 1332 | if (fd < 0) { |
1333 | rb->lcd_puts(0, 6, "File Error."); | 1333 | rb->lcd_puts(0, 6, "File Error."); |
1334 | return false; | 1334 | return false; |
1335 | } | 1335 | } |
@@ -1351,7 +1351,7 @@ static bool chip8_init(const char* file) | |||
1351 | c8kname[len-2] = '8'; | 1351 | c8kname[len-2] = '8'; |
1352 | c8kname[len-1] = 'k'; | 1352 | c8kname[len-1] = 'k'; |
1353 | fd = rb->open(c8kname, O_RDONLY); | 1353 | fd = rb->open(c8kname, O_RDONLY); |
1354 | if (fd!=-1) { | 1354 | if (fd >= 0) { |
1355 | rb->lcd_puts(0, 6, "File&Keymap OK."); | 1355 | rb->lcd_puts(0, 6, "File&Keymap OK."); |
1356 | numread = rb->read(fd, chip8_keymap, 16); | 1356 | numread = rb->read(fd, chip8_keymap, 16); |
1357 | rb->close(fd); | 1357 | rb->close(fd); |