about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2014-12-28 20:11:09 -0800
committerBarton E. Schaefer <schaefer@zsh.org>2014-12-28 20:11:09 -0800
commite11ad500dd7003fdb9a1bab8616aa853adf0f5ac (patch)
treeea3cd7526fdd8bf757d849398d7ba1cf1efa95cf
parent33b395806470eeac408070fec535bfd5efc20a2c (diff)
downloadzsh-e11ad500dd7003fdb9a1bab8616aa853adf0f5ac.tar.gz
zsh-e11ad500dd7003fdb9a1bab8616aa853adf0f5ac.tar.xz
zsh-e11ad500dd7003fdb9a1bab8616aa853adf0f5ac.zip
34070: fix starting position for memset() from 34005.
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/zle_refresh.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7ffa35e53..e9df215ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2014-12-28  Barton E. Schaefer  <schaefer@zsh.org>
 
+	* Daniel Shahaf: 34070: Src/Zle/zle_refresh.c: fix starting
+	position for memset() from 34005.
+
 	* 34068: Completion/Base/Widget/_complete_debug,
 	Completion/Unix/Command/_cvs, Completion/compinstall,
 	Functions/Calendar/calendar, Functions/Zftp/zfcd_match,
diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c
index c146e46eb..fe337993f 100644
--- a/Src/Zle/zle_refresh.c
+++ b/Src/Zle/zle_refresh.c
@@ -457,7 +457,7 @@ set_region_highlight(UNUSED(Param pm), char **aval)
 	    zrealloc(region_highlights,
 		     sizeof(struct region_highlight) * newsize);
 	if (diffsize > 0)
-	    memset(region_highlights + newsize, 0,
+	    memset(region_highlights + newsize - diffsize, 0,
 		   sizeof(struct region_highlight) * diffsize);
 	n_region_highlights = newsize;
     }