kiki78 Active Member Licensed User Longtime User Feb 25, 2015 #1 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
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
Erel B4X founder Staff member Licensed User Longtime User Feb 25, 2015 #2 Can you post some code that reproduces this issue?
kiki78 Active Member Licensed User Longtime User Feb 25, 2015 #3 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
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
Erel B4X founder Staff member Licensed User Longtime User Feb 25, 2015 #4 You are correct. Thank you. Will be fixed.
Erel B4X founder Staff member Licensed User Longtime User Feb 26, 2015 #5 The B4A and B4J libraries were fixed and will be included in the next update of the IDEs. You can also download the attached libraries. Attachments RandomAccessFile.zip 34.5 KB · Views: 205 jRandomAccessFile.zip 35.2 KB · Views: 190
The B4A and B4J libraries were fixed and will be included in the next update of the IDEs. You can also download the attached libraries.
kiki78 Active Member Licensed User Longtime User Feb 26, 2015 #6 Thank you Erel I change title to Solved.