nunuhara/xsystem4

str[str.Length()] should return zero

Closed this issue · 1 comments

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.

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().