diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-08-15 16:49:02 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-08-15 16:49:02 +0000 |
commit | f6224b786034632f5fb3eabb661e6da2834c3297 (patch) | |
tree | ebd0f3a0581ab431f0d1867e13f83e90f1cac6c2 /firmware/panic.c | |
parent | 63212628543e4f7e6b2e7a30c8c815231d1d3140 (diff) | |
download | rockbox-f6224b786034632f5fb3eabb661e6da2834c3297.tar.gz rockbox-f6224b786034632f5fb3eabb661e6da2834c3297.zip |
Change 18 char limit to (LCD_WIDTH/SYSFONT_WIDTH) in panicf() (FS#9282)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18288 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/panic.c')
-rw-r--r-- | firmware/panic.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/firmware/panic.c b/firmware/panic.c index e66676c1c2..8fcdd24188 100644 --- a/firmware/panic.c +++ b/firmware/panic.c | |||
@@ -69,11 +69,12 @@ void panicf( const char *fmt, ...) | |||
69 | { | 69 | { |
70 | /* wrap panic line */ | 70 | /* wrap panic line */ |
71 | int i, y=1, len = strlen(panic_buf); | 71 | int i, y=1, len = strlen(panic_buf); |
72 | for (i=0; i<len; i+=18) { | 72 | #define STEP (LCD_WIDTH/SYSFONT_WIDTH) |
73 | unsigned char c = panic_buf[i+18]; | 73 | for (i=0; i<len; i+=STEP) { |
74 | panic_buf[i+18] = 0; | 74 | unsigned char c = panic_buf[i+STEP]; |
75 | panic_buf[i+STEP] = 0; | ||
75 | lcd_puts(0, y++, (unsigned char *)panic_buf+i); | 76 | lcd_puts(0, y++, (unsigned char *)panic_buf+i); |
76 | panic_buf[i+18] = c; | 77 | panic_buf[i+STEP] = c; |
77 | } | 78 | } |
78 | } | 79 | } |
79 | #else | 80 | #else |