diff options
Diffstat (limited to 'apps/plugins/sudoku/sudoku.c')
-rw-r--r-- | apps/plugins/sudoku/sudoku.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/plugins/sudoku/sudoku.c b/apps/plugins/sudoku/sudoku.c index f8a438592d..77f6ca7899 100644 --- a/apps/plugins/sudoku/sudoku.c +++ b/apps/plugins/sudoku/sudoku.c | |||
@@ -603,7 +603,7 @@ void default_state(struct sudoku_state_t* state) | |||
603 | { | 603 | { |
604 | int r,c; | 604 | int r,c; |
605 | 605 | ||
606 | rb->strncpy(state->filename,GAME_FILE,MAX_PATH); | 606 | rb->strlcpy(state->filename,GAME_FILE,MAX_PATH); |
607 | for (r=0;r<9;r++) { | 607 | for (r=0;r<9;r++) { |
608 | for (c=0;c<9;c++) { | 608 | for (c=0;c<9;c++) { |
609 | state->startboard[r][c]=default_game[r][c]; | 609 | state->startboard[r][c]=default_game[r][c]; |
@@ -626,7 +626,7 @@ void clear_state(struct sudoku_state_t* state) | |||
626 | { | 626 | { |
627 | int r,c; | 627 | int r,c; |
628 | 628 | ||
629 | rb->strncpy(state->filename,GAME_FILE,MAX_PATH); | 629 | rb->strlcpy(state->filename,GAME_FILE,MAX_PATH); |
630 | for (r=0;r<9;r++) { | 630 | for (r=0;r<9;r++) { |
631 | for (c=0;c<9;c++) { | 631 | for (c=0;c<9;c++) { |
632 | state->startboard[r][c]='0'; | 632 | state->startboard[r][c]='0'; |
@@ -719,7 +719,7 @@ bool load_sudoku(struct sudoku_state_t* state, char* filename) | |||
719 | return(false); | 719 | return(false); |
720 | } | 720 | } |
721 | 721 | ||
722 | rb->strncpy(state->filename,filename,MAX_PATH); | 722 | rb->strlcpy(state->filename,filename,MAX_PATH); |
723 | n=rb->read(fd,buf,300); | 723 | n=rb->read(fd,buf,300); |
724 | if (n <= 0) { | 724 | if (n <= 0) { |
725 | return(false); | 725 | return(false); |
@@ -1111,7 +1111,7 @@ bool sudoku_generate(struct sudoku_state_t* state) | |||
1111 | rb->snprintf(str,sizeof(str),"Difficulty: %s",difficulty); | 1111 | rb->snprintf(str,sizeof(str),"Difficulty: %s",difficulty); |
1112 | display_board(state); | 1112 | display_board(state); |
1113 | rb->splash(HZ*3, str); | 1113 | rb->splash(HZ*3, str); |
1114 | rb->strncpy(state->filename,GAME_FILE,MAX_PATH); | 1114 | rb->strlcpy(state->filename,GAME_FILE,MAX_PATH); |
1115 | } else { | 1115 | } else { |
1116 | display_board(&new_state); | 1116 | display_board(&new_state); |
1117 | rb->splash(HZ*2, "Aborted"); | 1117 | rb->splash(HZ*2, "Aborted"); |