Closed dadahsueh closed 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.
https://doc.rust-lang.org/std/ffi/struct.CStr.html#method.to_str The function appears to have always been broken
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.