projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b9c2428
)
gui: Fix a bug in align_str().
author
Andre Noll
<maan@systemlinux.org>
Fri, 21 Aug 2009 19:05:36 +0000
(21:05 +0200)
committer
Andre Noll
<maan@systemlinux.org>
Fri, 21 Aug 2009 19:05:36 +0000
(21:05 +0200)
This bug was introduced in
01117585
. It messes up the display and can lead to a
segfault.
gui.c
patch
|
blob
|
history
diff --git
a/gui.c
b/gui.c
index b37f8fbd5d6db608b9c3086f508809aa52500737..5b44819c05afc074fadca3a5a7d5c1ece9fe8b8f 100644
(file)
--- a/
gui.c
+++ b/
gui.c
@@
-309,7
+309,7
@@
static int align_str(WINDOW* win, char *str, unsigned int len,
num = 0;
}
/* replace newlines by spaces */
- for (i = 0; i < len; i++) {
+ for (i = 0; i < len
&& str[i]
; i++) {
if (str[i] == '\n')
str[i] = ' ';
}