str[str.Length()] should return zero
Closed this issue · 1 comments
kichikuou commented
Currently it makes xsystem4 exit with "String index out of bounds" error.
I found this while trying to run Big Bang Age, which has code that iterates over a string assuming that it's zero-terminated.
kichikuou commented
Actually, str[i]
in System40.exe works more interestingly. It throws an error if i < 0 || i > str.LengthByte()
, and returns 0 if str.Length() <= i <= str.LengthByte()
.