authorblues / bizhawk-shuffler-2

A script to randomly shuffle between games played in Bizhawk, with plugins to enhance the experience
MIT License
58 stars 21 forks source link

Possible infinite loop in ZOOTR plugin #35

Closed kalimag closed 3 years ago

kalimag commented 3 years ago

https://github.com/authorblues/bizhawk-shuffler-2/blob/409555a3048b17f8fd14ab54b883c5dd5f6be346/plugins/solo-zootr-multiworld.lua#L233-L236

A key having a nil value is the same as a key not existing in a Lua table. Inserting nil will not increment the table length, so this code should result in an infinite loop.

authorblues commented 3 years ago

Thanks for catching this! This code path should hopefully happen so infrequently that I might never have caught the problem.