diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2022-04-07 13:05:08 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2022-04-07 13:05:08 -0400 |
commit | 6d25f97d1035a775d6eb9f135f8e8231521087af (patch) | |
tree | 21c3488541f4a65a16245792c6055f3d886b8fbb /src/texec/libtnsl.go | |
parent | da6f4e15ad2fa3edd59108913065c883aee897ed (diff) |
[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
Diffstat (limited to 'src/texec/libtnsl.go')
-rw-r--r-- | src/texec/libtnsl.go | 7 |
1 files changed, 6 insertions, 1 deletions
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() |