mgeti() does not read int64 and uint64 data correctly
Reported by j-lan
64test3.sce (1.00 KB, text/plain)
testing mgeti()
BUG DESCRIPTION:
----------------
The help files states that the type parameter for mget() and mgeti() has the default type "l", but then states that "l" is only valid for mget(). mgeti() will still accept "l", but will not correctly copy 8 bytes into a int64 variable (reduce precision to double - 53 bits?).
The number of bytes read for the different types should be clearly stated.
ERROR LOG:
----------
mgeti(fid) - in Scilab 6.0.0 will read all bytes but return one integer type 4 based on the first 8 bytes (overflowing if byte 5-8>0).
in Scilab 5.5.2 will read all bytes and return integers type 4 based on 4 bytes each.
mgeti(1,'ull'fid) - in Scilab 6.0.0 will read 8 bytes and return one integer type 18 with the value rounded to double precision.
in Scilab 5.5.2 will read 8 bytes and return one integer type 14 based on the first 4 bytes.
HOW TO REPRODUCE THE BUG:
-------------------------
attached file
OTHER INFORMATION:
------------------