From fff22d1db5891e3e6ee772925b5b97c94d375b2b Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Mon, 13 Feb 2017 22:19:33 +0100 Subject: Fix NULL terminator bug --- CLPM/Util.icl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CLPM/Util.icl b/CLPM/Util.icl index cea514c..ef8e247 100644 --- a/CLPM/Util.icl +++ b/CLPM/Util.icl @@ -81,9 +81,12 @@ where = receiveRest {resp & rsp_data=resp.rsp_data + toString (fromJust newresp)} chan w syscall :: !String !*World -> *(!Int, !*World) -syscall cmd w = code { - ccall system "s:I:A" -} +syscall cmd w = sys (cmd +++ "\0") w +where + sys :: !String !*World -> *(!Int, !*World) + sys _ _ = code { + ccall system "s:I:A" + } recursivelyRemove :: !FilePath !*World -> *(MaybeErrorString (), !*World) recursivelyRemove fp w -- cgit v1.2.3