Tracker
State
Calling LastIndexOf freezes the game when passed an empty string as parameter.
string haystack = "xyz"; string needle = ""; // could come from anywhere int lastIdx = haystack.LastIndexOf(needle); // <-- game freezes
When passing an empty needle to LastIndexOf, it should follow the convention of other languages and return haystack length instead of freezing.
Activity
You are not signed in. Please sign in to see more details and to reply.