summaryrefslogtreecommitdiff
path: root/apps/plugins/jewels.c
diff options
context:
space:
mode:
authorTeruaki Kawashima <teru@rockbox.org>2009-12-06 13:52:28 +0000
committerTeruaki Kawashima <teru@rockbox.org>2009-12-06 13:52:28 +0000
commit5cdd920d1267a7548ab492864c4a20a20c3d93ff (patch)
tree518ddb3cbbf4eabcb8ca0941e386a285c56b53bb /apps/plugins/jewels.c
parente760a5abbf951fd22e1dd8eb116e344ad3d76a61 (diff)
downloadrockbox-5cdd920d1267a7548ab492864c4a20a20c3d93ff.tar.gz
rockbox-5cdd920d1267a7548ab492864c4a20a20c3d93ff.zip
Correct checking return value of open in plugins.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23874 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/jewels.c')
-rw-r--r--apps/plugins/jewels.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c
index 51ad642c48..586caabfa5 100644
--- a/apps/plugins/jewels.c
+++ b/apps/plugins/jewels.c
@@ -480,6 +480,8 @@ static void jewels_savegame(struct game_context* bj)
480 int fd; 480 int fd;
481 /* write out the game state to the save file */ 481 /* write out the game state to the save file */
482 fd = rb->open(SAVE_FILE, O_WRONLY|O_CREAT); 482 fd = rb->open(SAVE_FILE, O_WRONLY|O_CREAT);
483 if(fd < 0) return;
484
483 rb->write(fd, &bj->tmp_type, sizeof(bj->tmp_type)); 485 rb->write(fd, &bj->tmp_type, sizeof(bj->tmp_type));
484 rb->write(fd, &bj->type, sizeof(bj->type)); 486 rb->write(fd, &bj->type, sizeof(bj->type));
485 rb->write(fd, &bj->score, sizeof(bj->score)); 487 rb->write(fd, &bj->score, sizeof(bj->score));