diff --git a/SourceGen/DisplayList.cs b/SourceGen/DisplayList.cs index 23df263..f8941af 100644 --- a/SourceGen/DisplayList.cs +++ b/SourceGen/DisplayList.cs @@ -366,7 +366,10 @@ namespace SourceGen { // Private constructor -- create instances with factory methods. - private FormattedParts() { } + private FormattedParts() { + Offset = Addr = Bytes = Flags = Attr = Label = Opcode = Operand = Comment = + string.Empty; + } /// /// Clones the specified object. diff --git a/SourceGen/Exporter.cs b/SourceGen/Exporter.cs index 67d61d3..b1adc25 100644 --- a/SourceGen/Exporter.cs +++ b/SourceGen/Exporter.cs @@ -502,7 +502,7 @@ namespace SourceGen { bool suppressLabel = false; if (LongLabelNewLine && (line.LineType == LineListGen.Line.Type.Code || line.LineType == LineListGen.Line.Type.Data)) { - int labelLen = string.IsNullOrEmpty(parts.Label) ? 0 : parts.Label.Length; + int labelLen = parts.Label.Length; if (labelLen > maxLabelLen) { // put on its own line string lstr;