From ee49eeec092cc093ce34d7d31b58123c8cb4bc18 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sun, 27 Nov 2016 22:02:10 -0500 Subject: [PATCH] fix endless word_wrap() loop when a label has a newline and no spaces --- menu/drivers/xmb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 5da6d86df8..1b738358f3 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1911,7 +1911,7 @@ char* word_wrap (char* buffer, char* string, int line_width) { i++; } /* check for whitespace */ - if ( isspace( string[ i ] ) ) + if (string[i] == ' ') { buffer[i] = '\n'; i++; @@ -1921,7 +1921,7 @@ char* word_wrap (char* buffer, char* string, int line_width) { /* check for nearest whitespace back in string */ for ( k = i; k > 0; k--) { - if ( isspace( string[ k ] ) ) + if (string[k] == ' ') { buffer[ k ] = '\n'; /* set string index back to character after this one */