Bug? SOLVED : RandomAccessFile Read or Write Bytes CurrentPosition update

kiki78

Active Member
Licensed User
Longtime User
I think I found bug in CurrentPosition update when using ReadBytes or WritesBytes in RandomAccessFile.

Before 4.30 (lib version 1.65), you set CurrentPosition by adding buffer length to Position parameter, that is correct.

In 4.30 (lib version 2.00), you add buffer length to previous value of CurrentPosition, that is not expected.

Regards
 

kiki78

Active Member
Licensed User
Longtime User
B4X:
Dim B(100) As Byte
Dim R As RandomAccessFile
R.Initialize3(B, False)
Dim T(8) As Byte
R.WriteBytes(T, 0, T.Length, 45)
Log(R.CurrentPosition) 'You obtain 8 in place of 53
 
Top