characters, found by valgrind (and caused by a bad merge of part of DB's
code)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2234
35c25a1d-7b9e-4130-9fde-
d3aeb78583b8
assert(column <= start_col);
alloc_len = display_string_len(buf + start_index, start_col,
- start_col + len) + 2;
+ start_col + len);
+ alloc_len +=
+#ifdef NANO_WIDE
+ MB_CUR_MAX
+#else
+ 1
+#endif
+ * 2;
+
converted = charalloc(alloc_len + 1);
index = 0;
}
/* Make sure that converted is at most len columns wide. */
- converted[index] = '\0';
- index = actual_x(converted, len);
null_at(&converted, index);
return converted;