From 739f0ecd9490d2b59f29c27df520269968a3b956 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Sun, 5 Aug 2007 04:16:21 +0000 Subject: 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 --- apps/plugins/viewer.c | 7 +++++-- 1 file 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) for (i=size-1; i>=0; i--) for (j=k; j < (int) sizeof(line_break); j++) - if (p[i] == line_break[j]) - return (unsigned char*) p+i; + { + if (((p[i] != '-') && (prefs.word_mode != WRAP))) + if (p[i] == line_break[j]) + return (unsigned char*) p+i; + } return NULL; } -- cgit v1.2.3