Skip to content

Release refs/tags/v0.99.9

Latest
Compare
Choose a tag to compare
@Yida-Lin Yida-Lin released this 25 Aug 23:15
45dbf90
Fixed potentially uninitialized variable (#41)

In the case where the file has reached the end, readBin doesn't initialize the "bytes" variable. It therefore contains garbage values, which has a small chance of making the switch select another case than "default", leading to an infinite loop. This isn't just speculation, this has actually happened to me while compiling in Unreal 5.3.
It is worth mentionning that the idiomatic way of checking whether or not the file has reached the end is to use file.eof() instead of relying on the fact that the variable isn't touched by "read".