readline fix for rl_undo_list pointer aliasing; arith command sets word_top

This commit is contained in:
Chet Ramey
2023-03-06 10:50:45 -05:00
parent 0bd0fb5966
commit 277c21d2b2
14 changed files with 414 additions and 32 deletions
+1 -1
View File
@@ -477,7 +477,7 @@ indirection_level_string (void)
/* Dynamically resize indirection_string so we have room for everything
and we don't have to truncate ps4 */
ineed = (ps4_firstc_len * indirection_level) + strlen (ps4);
if (ineed > indirection_stringsiz - 1)
if (ineed + 1 > indirection_stringsiz)
{
indirection_stringsiz = ineed + 1;
indirection_string = xrealloc (indirection_string, indirection_stringsiz);