1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-07-04 16:30:01 +00:00

Init all FormattedParts strings fields to an empty string

Fixes issue #51.
This commit is contained in:
Andy McFadden 2019-10-06 14:38:49 -07:00
parent 847dd47f01
commit 1980a475ca
2 changed files with 5 additions and 2 deletions

View File

@ -366,7 +366,10 @@ namespace SourceGen {
// Private constructor -- create instances with factory methods. // Private constructor -- create instances with factory methods.
private FormattedParts() { } private FormattedParts() {
Offset = Addr = Bytes = Flags = Attr = Label = Opcode = Operand = Comment =
string.Empty;
}
/// <summary> /// <summary>
/// Clones the specified object. /// Clones the specified object.

View File

@ -502,7 +502,7 @@ namespace SourceGen {
bool suppressLabel = false; bool suppressLabel = false;
if (LongLabelNewLine && (line.LineType == LineListGen.Line.Type.Code || if (LongLabelNewLine && (line.LineType == LineListGen.Line.Type.Code ||
line.LineType == LineListGen.Line.Type.Data)) { line.LineType == LineListGen.Line.Type.Data)) {
int labelLen = string.IsNullOrEmpty(parts.Label) ? 0 : parts.Label.Length; int labelLen = parts.Label.Length;
if (labelLen > maxLabelLen) { if (labelLen > maxLabelLen) {
// put on its own line // put on its own line
string lstr; string lstr;