diff options
author | Tim Angus <tim@ngus.net> | 2004-03-20 03:37:35 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2004-03-20 03:37:35 +0000 |
commit | c5d421e1af51f714192b236933df7bde5a331000 (patch) | |
tree | 197420aab97494e341400e814f3a3ef4f1d64c5e | |
parent | 23e5d1b97402c638c2207031ed8e097e64b5342c (diff) |
* Fixed an infinite loop bug in the text wrapping code
-rw-r--r-- | src/ui/ui_shared.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/ui_shared.c b/src/ui/ui_shared.c index 77e6c5f5..002d9219 100644 --- a/src/ui/ui_shared.c +++ b/src/ui/ui_shared.c @@ -2891,7 +2891,7 @@ int Item_Text_AutoWrapped_Lines( itemDef_t *item ) } //TA: forceably split lines that are too long (where normal splitage has failed) - if( textWidth > item->window.rect.w && newLine == 0 ) + if( textWidth > item->window.rect.w && newLine == 0 && *p != '\n' ) { newLine = len; newLinePtr = p; @@ -3068,7 +3068,7 @@ void Item_Text_AutoWrapped_Paint( itemDef_t *item ) } //TA: forceably split lines that are too long (where normal splitage has failed) - if( textWidth > item->window.rect.w && newLine == 0 ) + if( textWidth > item->window.rect.w && newLine == 0 && *p != '\n' ) { newLine = len; newLinePtr = p; |