GP-6448 - Fix for label names that have namespace delimiters

This commit is contained in:
dragonmacher
2026-02-25 18:59:23 -05:00
parent 4d9441abc8
commit ef39bfe1d8
@@ -54,12 +54,16 @@ public class LabelFieldLocation extends CodeUnitLocation {
Namespace namespace, int row, int charOffset) {
super(program, addr, componentPath, row, 0, charOffset);
if (namespace == null || namespace.isGlobal()) {
symbolPath = new SymbolPath(label);
}
else {
symbolPath = new SymbolPath(new SymbolPath(namespace.getSymbol()), label);
SymbolPath nsPath = null;
if (namespace != null && !namespace.isGlobal()) {
nsPath = new SymbolPath(namespace.getSymbol());
}
// Note: use the constructor that does not parse the name. Assume all label field
// locations are for existing symbol names or those that otherwise should not need to be
// parsed. Parsing for existing symbols may incorrectly split on namespace delimiters that
// are part of the symbol name.
symbolPath = new SymbolPath(nsPath, label);
}
/**