mirror of
https://github.com/dlang-community/DCD.git
synced 2025-04-25 21:00:02 +03:00
Fix out of bounds access in complete.d when there is no paren. (#754)
This commit is contained in:
parent
8a693954d3
commit
dc11cf704d
1 changed files with 6 additions and 1 deletions
|
@ -361,7 +361,12 @@ CalltipHint getCalltipHint(T)(T beforeTokens, out size_t parenIndex)
|
|||
// evaluate at comma case
|
||||
if (beforeTokens.isComma)
|
||||
{
|
||||
parenIndex = beforeTokens.goBackToOpenParen;
|
||||
size_t tmp = beforeTokens.goBackToOpenParen;
|
||||
if(tmp == size_t.max){
|
||||
return CalltipHint.regularArguments;
|
||||
}
|
||||
parenIndex = tmp;
|
||||
|
||||
// check if we are actually a "!("
|
||||
if (beforeTokens[0 .. parenIndex].isTemplateBangParen)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue