mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
bug 91878: ArrayIndexOutOfBoundsException & ClassCastException
This commit is contained in:
parent
12c064978c
commit
ccee647b44
2 changed files with 5 additions and 2 deletions
|
@ -118,7 +118,7 @@ public class CPPVariable implements ICPPVariable, ICPPInternalBinding {
|
||||||
if( !( node instanceof IASTDeclarator ) )
|
if( !( node instanceof IASTDeclarator ) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
IASTDeclarator dtor = (IASTDeclarator) name.getParent();
|
IASTDeclarator dtor = (IASTDeclarator) node;
|
||||||
while( dtor.getParent() instanceof IASTDeclarator )
|
while( dtor.getParent() instanceof IASTDeclarator )
|
||||||
dtor = (IASTDeclarator) dtor.getParent();
|
dtor = (IASTDeclarator) dtor.getParent();
|
||||||
|
|
||||||
|
|
|
@ -982,7 +982,10 @@ public class CPPVisitor {
|
||||||
} catch ( DOMException e ) {
|
} catch ( DOMException e ) {
|
||||||
return PROCESS_CONTINUE;
|
return PROCESS_CONTINUE;
|
||||||
}
|
}
|
||||||
candidate = bs[ ++n ];
|
if( bs == null || bs.length == 0 )
|
||||||
|
candidate = null;
|
||||||
|
else
|
||||||
|
candidate = bs[ ++n ];
|
||||||
} else {
|
} else {
|
||||||
candidate = potential;
|
candidate = potential;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue