projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
less horrible strncpy's
[apps/madmutt.git]
/
thread.c
diff --git
a/thread.c
b/thread.c
index
ae5ebbe
..
dc786bb
100644
(file)
--- a/
thread.c
+++ b/
thread.c
@@
-243,7
+243,7
@@
void mutt_draw_tree (CONTEXT * ctx)
myarrow[width + 1] = 0;
new_tree = p_new(char, (2 + depth * width));
if (start_depth > 1) {
myarrow[width + 1] = 0;
new_tree = p_new(char, (2 + depth * width));
if (start_depth > 1) {
-
strncpy
(new_tree, pfx, (start_depth - 1) * width);
+
memcpy
(new_tree, pfx, (start_depth - 1) * width);
strfcpy (new_tree + (start_depth - 1) * width,
arrow, (1 + depth - start_depth) * width + 2);
}
strfcpy (new_tree + (start_depth - 1) * width,
arrow, (1 + depth - start_depth) * width + 2);
}