File: cherry-pick_ebd7fdd9_fix_setting_of_parameter_values_in_compvalues.patch

package info (click to toggle)
zsh 5.3.1-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 16,324 kB
  • ctags: 8,554
  • sloc: ansic: 104,868; sh: 6,584; perl: 813; makefile: 774; awk: 388; sed: 16
file content (18 lines) | stat: -rw-r--r-- 616 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: Fix setting of parameter values in compvalues
Origin: ebd7fdd9326cf36feda3b0ca906d7b9b8bf79cb5
Author: Peter Stephenson <p.w.stephenson@ntlworld.com>
Reviewed-By: Daniel Shahaf <d.s@daniel.shahaf.name>

--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -3546,8 +3546,8 @@
 	    Cvval val = cv_get_val(cv_laststate.d, args[1]);
 
 	    if (val && val->arg) {
-		setsparam(args[2], val->arg->descr);
-		setsparam(args[3], val->arg->action);
+		setsparam(args[2], ztrdup(val->arg->descr));
+		setsparam(args[3], ztrdup(val->arg->action));
 
 		if (args[4])
 		    setsparam(args[4], ztrdup(val->name));