diff options
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() |