Search Issue Tracker
Fixed
Fixed in 1.0.1
Votes
0
Found in [Package]
1.0.0-pre.10
Issue ID
NCCBUG-175
Regression
No
Incorrect results when using BitReader or BitWriter with more than 8 bits
Reproduction steps:
1. Open the attached “BitReaderWriter“ project
2. Open Test Runner (Window > General > Test Runner)
3. Run all tests
Expected result: Tests pass
Actual result: Tests fail
Reproduced with: 1.0.0 (2020.3.37f1, 2021.3.6f1, 2022.1.9f1, 2022.2.0b1, 2023.1.0a3)
Note: In the constructor, the m_BufferPointer variable is set to be the buffer plus the position, but then the position is added again in the WritePartialValue function
Code in WritePartialValue function:
byte* ptr = ((byte*)&value) + offsetBytes;
byte* bufferPointer = m_BufferPointer + m_Position;
UnsafeUtility.MemCpy(bufferPointer, ptr, bytesToWrite);
Suggested fix:
byte* ptr = ((byte*)&value) + offsetBytes;
UnsafeUtility.MemCpy(m_BufferPointer, ptr, bytesToWrite);
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Created asset is placed in a new folder when creating a new folder and instantly creating an asset by clicking somewhere else
- Selecting and deleting transition in Animator does not add to Undo History when animation is previewed in Inspector
- GameObjects remain static when updating constraints of PhysicsJoint with "Enable Sleeping" selected in Havok Physics Configuration
- [iOS] Touch input is not clocked and UI is unresponsive when the application is paused mid-drag without lifting the finger
- [sw-unity-6-1] Scene view renders any light differently when more than one camera exists and neither have the "MainCamera" tag
Add comment