From 6d25f97d1035a775d6eb9f135f8e8231521087af Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Thu, 7 Apr 2022 13:05:08 -0400 Subject: [EXEC] Some fixes + Fix recursion error when converting arrays + Add conversion from bool to num + Fix conversion from num to bool + Flush out evalParams ~ Change type parsing for block returns --- src/texec/libtnsl.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/texec/libtnsl.go') diff --git a/src/texec/libtnsl.go b/src/texec/libtnsl.go index 6c34473..6fe431b 100644 --- a/src/texec/libtnsl.go +++ b/src/texec/libtnsl.go @@ -179,7 +179,12 @@ func tfile_write(file, in TVariable) { b[0] = (in.Data).(byte) (file.Data).(*os.File).Write(b) } else if equateType(in.Type, tByteArray) || equateType(in.Type, tString) { - (file.Data).(*os.File).Write((in.Data).([]byte)) + dat := (in.Data).([]interface{}) + wrt := []byte{} + for i := 0; i < len(dat); i++ { + wrt = append(wrt, dat[i].(byte)) + } + (file.Data).(*os.File).Write(wrt) } } else { (file.Data).(*os.File).Close() -- cgit v1.2.3