Merge remote-tracking branch 'origin/GP-0-dragonmacher-test-fixes-4-30-26'

This commit is contained in:
Ryan Kurtz
2026-04-30 11:17:21 -04:00
2 changed files with 15 additions and 7 deletions
@@ -68,25 +68,37 @@ public class LabelFieldSymbolLoader {
return; return;
} }
boolean showPrimary = !ignoreSymbol(primary);
int remaining = showPrimary ? max - 1 : max;
while (it.hasNext()) { while (it.hasNext()) {
Symbol s = it.next(); Symbol s = it.next();
if (s.isPrimary()) { if (s.isPrimary()) {
continue; continue;
} }
if ((max - 1) == symbols.size()) { // -1 to save space for primary if (remaining == symbols.size()) {
hasMore = true; hasMore = true;
break; break;
} }
if (s instanceof FunctionSymbol && !displayFunctionLabel) { if (ignoreSymbol(s)) {
continue; continue;
} }
symbols.add(s); symbols.add(s);
} }
symbols.add(primary); if (showPrimary) {
symbols.add(primary);
}
}
private boolean ignoreSymbol(Symbol s) {
if (s instanceof FunctionSymbol) {
return !displayFunctionLabel;
}
return false;
} }
private void gatherOffcutSymbols(CodeUnit cu, int max) { private void gatherOffcutSymbols(CodeUnit cu, int max) {
@@ -44,10 +44,6 @@ public class LabelFieldFactoryTest extends AbstractGhidraHeadedIntegrationTest {
private CodeBrowserPlugin cb; private CodeBrowserPlugin cb;
private Program program; private Program program;
public LabelFieldFactoryTest() {
super();
}
@Before @Before
public void setUp() throws Exception { public void setUp() throws Exception {