summaryrefslogtreecommitdiff
path: root/apps/plugins/viewer.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/viewer.c')
-rw-r--r--apps/plugins/viewer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c
index 01293030a4..9024825104 100644
--- a/apps/plugins/viewer.c
+++ b/apps/plugins/viewer.c
@@ -1034,7 +1034,6 @@ static void viewer_load_settings(void) /* same name as global, but not the same
1034 if (settings_fd >= 0) 1034 if (settings_fd >= 0)
1035 { 1035 {
1036 struct bookmark_file_data *data = (struct bookmark_file_data*)buffer; /* grab the text buffer */ 1036 struct bookmark_file_data *data = (struct bookmark_file_data*)buffer; /* grab the text buffer */
1037 struct bookmark_file_data dummy;
1038 int i; 1037 int i;
1039 data->bookmarked_files_count = 0; 1038 data->bookmarked_files_count = 0;
1040 rb->read(settings_fd, &data->bookmarked_files_count, sizeof(signed int)); /* figure out how many items to read */ 1039 rb->read(settings_fd, &data->bookmarked_files_count, sizeof(signed int)); /* figure out how many items to read */
@@ -1105,9 +1104,10 @@ static void viewer_save_settings(void)/* same name as global, but not the same f
1105 settings_fd = rb->open(BOOKMARKS_FILE, O_WRONLY|O_CREAT); 1104 settings_fd = rb->open(BOOKMARKS_FILE, O_WRONLY|O_CREAT);
1106 if (settings_fd >= 0 ) 1105 if (settings_fd >= 0 )
1107 { 1106 {
1108 struct bookmarked_file_info b = {0,0,""}; 1107 struct bookmarked_file_info b;
1109 b.file_position = file_pos; 1108 b.file_position = file_pos;
1110 b.top_ptr_pos = screen_top_ptr - buffer; 1109 b.top_ptr_pos = screen_top_ptr - buffer;
1110 rb->memset(&b.filename[0],0,MAX_PATH);
1111 rb->strcpy(b.filename,file_name); 1111 rb->strcpy(b.filename,file_name);
1112 rb->PREFIX(lseek)(settings_fd,sizeof(signed int),SEEK_SET); 1112 rb->PREFIX(lseek)(settings_fd,sizeof(signed int),SEEK_SET);
1113 rb->write (settings_fd, &b, sizeof(struct bookmarked_file_info)); 1113 rb->write (settings_fd, &b, sizeof(struct bookmarked_file_info));