ethangreen-dev / lovely-injector

A runtime lua injector for games built with LÖVE
MIT License
78 stars 11 forks source link

Fix unconditional removal of last byte #53 #54

Closed dadahsueh closed 4 months ago

dadahsueh commented 4 months ago

Fix unconditional removal of last byte which is supposed to be a null byte, by adding a check for whether the last byte is a null terminator and adjusting size accordingly.

english5040 commented 4 months ago

https://doc.rust-lang.org/std/ffi/struct.CStr.html#method.to_str The function appears to have always been broken