FiguraMC / Figura

Extensively customize your character with Figura!
https://modrinth.com/mod/figura
GNU Lesser General Public License v2.1
253 stars 46 forks source link

Fixes a crash caused by __newindex in _G #249

Closed GrandpaScout closed 2 months ago

GrandpaScout commented 3 months ago

When Figura adds player to the environment, it does not do so with raw methods, allowing others to catch it in an unprotected context.


Throwing an error in Lua in an unprotected context will cause a game crash if it isn't caught somewhere in Java.

This changes some instances of userGlobals.get and userGlobals.set to their raw counterparts to avoid this.

Fixes https://discord.com/channels/1129805506354085959/1263490063694561311