branch: elpa/exec-path-from-shell
commit 2b6651242f013d60833e3264bb350e1d897d5457
Author: Steve Purcell <[email protected]>
Commit: Steve Purcell <[email protected]>
Unambigiously escape the null character (fixes #5)
---
exec-path-from-shell.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/exec-path-from-shell.el b/exec-path-from-shell.el
index 6c148906a8..89648d0a93 100644
--- a/exec-path-from-shell.el
+++ b/exec-path-from-shell.el
@@ -76,7 +76,7 @@ and may therefore contain backslashed escape sequences, but
must not
contain the '%' character."
(with-temp-buffer
(call-process (getenv "SHELL") nil (current-buffer) nil
- "--login" "-i" "-c" (concat "printf \"__RESULT\\0" str "\""))
+ "--login" "-i" "-c" (concat "printf \"__RESULT\\000" str
"\""))
(goto-char (point-min))
(when (re-search-forward "__RESULT\0\\(.*\\)" nil t)
(match-string 1))))