We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7db34da commit 4523298Copy full SHA for 4523298
src/async-process.lisp
@@ -94,11 +94,12 @@
94
(%process-send-input (process-process process) string)))
95
96
(defun pointer-to-string (pointer)
97
- (let ((bytes (loop :for i :from 0
98
- :for code := (cffi:mem-aref pointer :unsigned-char i)
99
- :until (zerop code)
100
- :collect code)))
101
- (map 'string 'code-char bytes)))
+ (unless (cffi:null-pointer-p pointer)
+ (let ((bytes (loop :for i :from 0
+ :for code := (cffi:mem-aref pointer :unsigned-char i)
+ :until (zerop code)
+ :collect code)))
102
+ (map 'string 'code-char bytes))))
103
104
(defun process-receive-output (process)
105
(let ((cffi:*default-foreign-encoding* (process-encode process)))
0 commit comments