mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-05 13:30:34 +00:00
Merge pull request #653 from Ragora/bugfix-asan-tabcomplete
BugFix: Correct an invalid memory access error caused by the tab autocomplete
This commit is contained in:
commit
7c1574355f
1 changed files with 7 additions and 0 deletions
|
|
@ -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] == '.')
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue