AM2R-Community-Developers / AM2R-Community-Updates

Source code for AM2R 1.5.2+, free of copyrighted assets and trademarks.
https://www.reddit.com/r/AM2R/
Other
138 stars 27 forks source link

Having long values in modifiers.ini results in a out-of-memory-crash. #46

Closed Miepee closed 2 years ago

Miepee commented 3 years ago

Describe the bug Having long values in modifiers.ini results in a out-of-memory-crash.

To Reproduce Just have a really long value in the modifiers.ini (in my testing, the resulted file was almost 2GB, this may happen sooner as well)

Expected behavior No crash

Platform (please complete the following information):

Game Version: 1.5.2

Additional context I'm not sure if this is actually fixable or not, since I'm pretty sure the crash occurs while trying to actually open the file. Not sure, but maybe it's possible to check if the file has exceeded a specific length, and then delete it and start a new one?

Lojemiru commented 3 years ago

I didn't think GM:S had this functionality, but apparently we can check the binary size of a file: https://docs.yoyogames.com/source/dadiospice/002_reference/file handling/binary files/file_bin_size.html