Commit 0251bdb0 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

fix display problem caused by the memory corruption fix

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2237 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 6 additions and 0 deletions
+6 -0
......@@ -2470,7 +2470,13 @@ char *display_string(const char *buf, size_t start_col, size_t len, bool
start_index += wide_buf_len;
}
if (index < alloc_len)
converted[index] = '\0';
/* Make sure converted takes up no more than len columns. */
index = actual_x(converted, len);
null_at(&converted, index);
return converted;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment