"write" drops some characters when the string length is >4096
Reported by mame
test.sci (105 bytes, application/x-scilab-sci)
test.sci
BUG DESCRIPTION:
----------------
When a program try to call "write" against a long string, a few characters losts.
ERROR LOG:
----------
None.
HOW TO REPRODUCE THE BUG:
-------------------------
Save the attached file called test.sci:
s = strcat(repmat("X", [1, 4090]))
s = s + "0123456789"
write(%io(2), s)
quit
and then run "scilab -nw -f test.sci":
Expect: it prints "XXX...XXX0123456789".
Actual: it prints "XXX...XXX01236789".
Note that the fragment "45" losts.
OTHER INFORMATION:
------------------
I'm using the scilab package in Ubuntu 14.10.
$ scilab -version
Scilab version "5.5.0.1397209685"
scilab-5.5.0
The following prints "4100", so I think this is a bug of "write", not of.a string object itself.
s = strcat(repmat("X", [1, 4090]))
s = s + "0123456789"
printf("%d", length(s))
quit