bug+patch for locateInStringList (physfs 1.1.0)
matze at braunis.de
Sun Sep 11 13:19:45 EDT 2005
The locateInStringList function from physfs 1.1.0 contains a bug:
if the string we search is greater than all elements in a list, then
"lo" will become hi+1 and exceeds the limits of the list. This bug is
quiet severe as it makes physfs randomly crash when
PHYSFS_enumerateFiles is used.
I adapted the algorithm from STL std::lower_bound to work in physfs.
This makes the code correct and a bit cleaner. A patch is attached to
I hope you can soon find the time to release a new version of physfs!
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2002 bytes
Desc: not available
More information about the physfs