summaryrefslogtreecommitdiff
path: root/apps/plugins/text_viewer
diff options
context:
space:
mode:
authorAvi Eisenberg <613ike@gmail.com>2014-02-07 11:25:02 -0500
committerThomas Martitz <kugel@rockbox.org>2014-02-07 17:57:17 +0100
commitf723ca58055a6acc7c4c2e8eff8709bd8fdc32b1 (patch)
treeecdd543761bb7f4de5706a7d98a3b0a3ad9b2f12 /apps/plugins/text_viewer
parent457bdfb6fc3f940aa834aa5483bea7bc95610c3d (diff)
downloadrockbox-f723ca58055a6acc7c4c2e8eff8709bd8fdc32b1.tar.gz
rockbox-f723ca58055a6acc7c4c2e8eff8709bd8fdc32b1.zip
Fixed bug where exiting textviewer after using up all the bookmarks caused that file unable to be read the next time.
Change-Id: I1924fe68c8528c03c4197f74a4f014edb0ac9f2a
Diffstat (limited to 'apps/plugins/text_viewer')
-rw-r--r--apps/plugins/text_viewer/tv_bookmark.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/plugins/text_viewer/tv_bookmark.c b/apps/plugins/text_viewer/tv_bookmark.c
index 5f77d2a92c..807c3e9a3b 100644
--- a/apps/plugins/text_viewer/tv_bookmark.c
+++ b/apps/plugins/text_viewer/tv_bookmark.c
@@ -159,6 +159,9 @@ void tv_create_system_bookmark(void)
159 bookmarks[idx].flag |= TV_BOOKMARK_SYSTEM; 159 bookmarks[idx].flag |= TV_BOOKMARK_SYSTEM;
160 else 160 else
161 { 161 {
162 /* we can't add a bookmark if there is no room left! */
163 if (bookmark_count == TV_MAX_BOOKMARKS)
164 return;
162 bookmarks[bookmark_count].pos = *pos; 165 bookmarks[bookmark_count].pos = *pos;
163 bookmarks[bookmark_count].flag = TV_BOOKMARK_SYSTEM; 166 bookmarks[bookmark_count].flag = TV_BOOKMARK_SYSTEM;
164 bookmark_count++; 167 bookmark_count++;