mirror of
https://github.com/fadden/6502bench.git
synced 2025-02-18 08:30:28 +00:00
Don't create bad DefSymbol
When editing an instruction operand, if you click "edit project symbol", we need an initial value for the label. If you started typing something in the instruction operand symbol field, we use that. Unfortunately we were trying to use that even when it was invalid, which caused an assertion to go off in the DefSymbol constructor.
This commit is contained in:
parent
44568f71ef
commit
589ff9bb36
@ -1005,8 +1005,9 @@ namespace SourceGen.WpfGui {
|
||||
if (origSym == null) {
|
||||
// Need to start with a symbol so we can set the value field.
|
||||
string symName = "SYM";
|
||||
if (!string.IsNullOrEmpty(SymbolLabel)) {
|
||||
symName = SymbolLabel; // may not be valid, but it doesn't have to be
|
||||
if (!string.IsNullOrEmpty(SymbolLabel) &&
|
||||
Asm65.Label.ValidateLabel(SymbolLabel)) {
|
||||
symName = SymbolLabel;
|
||||
}
|
||||
origSym = new DefSymbol(symName, mOperandValue, Symbol.Source.Project,
|
||||
Symbol.Type.ExternalAddr, FormatDescriptor.SubType.None);
|
||||
|
Loading…
x
Reference in New Issue
Block a user