mirror of
https://github.com/github/codeql.git
synced 2026-07-20 02:38:23 +02:00
C++: Fix off-by-one error in getType on 'FinalGlobalValue' nodes and accept test changes.
This commit is contained in:
@@ -795,7 +795,7 @@ class FinalGlobalValue extends Node, TFinalGlobalValue {
|
||||
override DataFlowType getType() {
|
||||
exists(int indirectionIndex |
|
||||
indirectionIndex = globalUse.getIndirectionIndex() and
|
||||
result = getTypeImpl(globalUse.getUnderlyingType(), indirectionIndex - 1)
|
||||
result = getTypeImpl(globalUse.getUnderlyingType(), indirectionIndex)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user