about summary refs log tree commit diff
path: root/Src/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/init.c')
-rw-r--r--Src/init.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Src/init.c b/Src/init.c
index 60e7d3609..ef101069c 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -1148,7 +1148,7 @@ mod_export ZleVoidIntFn zlesetkeymapptr = noop_function_int;
 
 /**/
 unsigned char *
-autoload_zleread(char *lp, char *rp, int ha, int con)
+autoload_zleread(char **lp, char **rp, int ha, int con)
 {
     zlereadptr = fallback_zleread;
     if (load_module("zsh/zle"))
@@ -1158,12 +1158,12 @@ autoload_zleread(char *lp, char *rp, int ha, int con)
 
 /**/
 mod_export unsigned char *
-fallback_zleread(char *lp, UNUSED(char *rp), UNUSED(int ha), UNUSED(int con))
+fallback_zleread(char **lp, UNUSED(char **rp), UNUSED(int ha), UNUSED(int con))
 {
     char *pptbuf;
     int pptlen;
 
-    pptbuf = unmetafy(promptexpand(lp, 0, NULL, NULL), &pptlen);
+    pptbuf = unmetafy(promptexpand(lp ? *lp : NULL, 0, NULL, NULL), &pptlen);
     write(2, (WRITE_ARG_2_T)pptbuf, pptlen);
     free(pptbuf);