increpare / PuzzleScript

Open Source HTML5 Puzzle Game Engine
MIT License
903 stars 159 forks source link

Defining an object as itself throws recursion error in JS console #789

Closed Auroriax closed 2 years ago

Auroriax commented 2 years ago

It seems that in the editor, when you assign an object in the legend to be itself, directly after typing the object name, it throws a recursion error in the Javascript console that does not seem to be intentional. Does not seem to do any damage outside of that from what I've been able to determine. Seems to originate from commit https://github.com/increpare/PuzzleScript/commit/cd060427c30ee37e511eb6ae5f3abf8a24a8f21f (so could be autocomplete-related). Reproduced in Firefox.

afbeelding

increpare commented 2 years ago

Lol fun error; thanks :) should be easy enough to put in a check.

Tom H. @.***> schrieb am Fr. 26. Nov. 2021 um 20:26:

It seems that in the editor, when you assign an object in the legend to be itself, directly after typing the object name, it throws a recursion error in the Javascript console. Does not seem to do any damage outside of that from what I've been able to determine. Seems to originate from commit cd06042 https://github.com/increpare/PuzzleScript/commit/cd060427c30ee37e511eb6ae5f3abf8a24a8f21f (so could be autocomplete-related). Reproduced in Firefox.

[image: afbeelding] https://user-images.githubusercontent.com/6784890/143619263-420f2ac6-7c9c-4447-bd4f-f1a23f60a31c.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/increpare/PuzzleScript/issues/789, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADRVYC57KA37MTVN6WGVF3UN7GOBANCNFSM5I3FLQGA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

BentSm commented 2 years ago

It's not as innocent as it may seem:

OBJECTS
LEGEND

Zap = Zap
Fatal = Zap or Zap

kills the editor.