summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2007-08-05 04:16:21 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2007-08-05 04:16:21 +0000
commit739f0ecd9490d2b59f29c27df520269968a3b956 (patch)
treedb2ad8074c8b5de2441878e8c6e27e633363d873
parent7c54ad647bcb07fa0f449c56b0a63e66f973ad73 (diff)
downloadrockbox-739f0ecd9490d2b59f29c27df520269968a3b956.tar.gz
rockbox-739f0ecd9490d2b59f29c27df520269968a3b956.zip
quick fix for FS#6007 (the first point, where a long line with a - would stop the rest of the file being viewed if your in narrow line mode)
fix could probably be done better, but better this than the bug. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14187 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/viewer.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c
index 2c543edeeb..615ed41b86 100644
--- a/apps/plugins/viewer.c
+++ b/apps/plugins/viewer.c
@@ -376,8 +376,11 @@ static unsigned char* find_last_space(const unsigned char* p, int size)
376 376
377 for (i=size-1; i>=0; i--) 377 for (i=size-1; i>=0; i--)
378 for (j=k; j < (int) sizeof(line_break); j++) 378 for (j=k; j < (int) sizeof(line_break); j++)
379 if (p[i] == line_break[j]) 379 {
380 return (unsigned char*) p+i; 380 if (((p[i] != '-') && (prefs.word_mode != WRAP)))
381 if (p[i] == line_break[j])
382 return (unsigned char*) p+i;
383 }
381 384
382 return NULL; 385 return NULL;
383} 386}