openspy / openspy-core

132 stars 21 forks source link

Fixed string parsing in server filter #8

Closed NicknineTheEagle closed 1 year ago

NicknineTheEagle commented 1 year ago

This fixes a bug in server filter parser where if a string token is not followed by a whitespace or end of string, the first character of the next token would get eaten. Bug affects FlatOut 2 (example string below) and likely more games.

numplayers < maxplayers and gamever='FO14' and datachecksum='3546d58093237eb33b2a96bb813370d846ffcec8' and password=0 and (gamemode='openwaiting' or gamemode='openplaying') and gametype='stunt'

Closes https://github.com/chc/openspy-core-v2/issues/7. Thanks to CodaHighland for assistance with tracking this down.

chc commented 1 year ago

Thanks for this PR, I will test it with my upcoming changes and merge it in if everything looks good!

chc commented 1 year ago

This is now in testing on openspy, assuming no issues arrise I will merge this. Thanks again!