* BugFix: Correct an invalid memory access error caused by the tab autocomplete in the console when attempting to tab complete at the start of the input while there is text to the right.

This commit is contained in:
Robert MacGregor 2021-11-02 13:55:57 -04:00
parent a0e0e1f220
commit 2b53c065ce

View file

@ -485,6 +485,13 @@ U32 tabComplete(char* inputBuffer, U32 cursorPos, U32 maxResultLength, bool forw
}
completionBaseStart = p;
completionBaseLen = cursorPos - p;
// Bail if we end up at start of string
if (p == 0)
{
return cursorPos;
}
// Is this function being invoked on an object?
if (inputBuffer[p - 1] == '.')
{