StackOverflowException by Self-Referencing @import
描述
Description
When importing the same stylesheet within itself using @import it results in a StackOverflowException, causing Minecraft to crash.
Steps to Reproduce
- Create an LSS stylesheet file (test.lss)
- Import the stylesheet within itself (@import "test.lss";)
Expected Behavior
The stylesheet should either:
- Handle the self-referencing @import gracefully by ignoring it, or
- Provide a clear error message indicating the circular reference without causing a crash.
Actual Behavior
Minecraft crashes with a StackOverflowException due to the infinite loop caused by the self-referencing @import in the LSS stylesheet.
Operating System: Windows 10
Minecraft Version: unknown