diff options
Diffstat (limited to 'apps/plugins/chessbox/chessbox_pgn.c')
-rw-r--r-- | apps/plugins/chessbox/chessbox_pgn.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/plugins/chessbox/chessbox_pgn.c b/apps/plugins/chessbox/chessbox_pgn.c index 512fb0ca15..a165e3ee8c 100644 --- a/apps/plugins/chessbox/chessbox_pgn.c +++ b/apps/plugins/chessbox/chessbox_pgn.c | |||
@@ -564,7 +564,7 @@ struct pgn_game_node* pgn_list_games(const char* filename){ | |||
564 | int line_count = 0; | 564 | int line_count = 0; |
565 | bool header_start = true, game_start = false; | 565 | bool header_start = true, game_start = false; |
566 | 566 | ||
567 | if ( (fhandler = rb->open(filename, O_RDONLY)) == 0 ) return NULL; | 567 | if ( (fhandler = rb->open(filename, O_RDONLY)) < 0 ) return NULL; |
568 | 568 | ||
569 | if (bufptr == NULL){ | 569 | if (bufptr == NULL){ |
570 | pl_malloc_init(); | 570 | pl_malloc_init(); |
@@ -572,7 +572,7 @@ struct pgn_game_node* pgn_list_games(const char* filename){ | |||
572 | while (rb->read_line(fhandler, line_buffer, sizeof line_buffer) > 0){ | 572 | while (rb->read_line(fhandler, line_buffer, sizeof line_buffer) > 0){ |
573 | line_count++; | 573 | line_count++; |
574 | /* looking for a game header */ | 574 | /* looking for a game header */ |
575 | if (header_start) { | 575 | if (header_start) { |
576 | /* a new game header is found */ | 576 | /* a new game header is found */ |
577 | if (line_buffer[0] == '['){ | 577 | if (line_buffer[0] == '['){ |
578 | temp_node = (struct pgn_game_node *)pl_malloc(sizeof size_node); | 578 | temp_node = (struct pgn_game_node *)pl_malloc(sizeof size_node); |