Skip to content

Commit 6073f0a

Browse files
Fix: Export as DATA statements would calculate char wrap wrong (DATA treated as 1 byte)
1 parent ee63f79 commit 6073f0a

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

C64Models/Types/Util.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ internal static string ToBASICData( GR.Memory.ByteBuffer Data, int StartLine, in
285285
WrapCharCount = 20;
286286
}
287287
// length of line number plus token
288-
numBytesInLine = StartLine.ToString().Length + 1;
288+
numBytesInLine = StartLine.ToString().Length + 4;
289289

290290
while ( ( numBytesInLine < WrapCharCount )
291291
&& ( dataPos < Data.Length ) )

C64Studio/Controls/ExportCharscreenForms/ExportCharscreenAsBASICData.Designer.cs

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

C64Studio/Controls/ExportCharscreenForms/ExportCharscreenAsBASICData.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,5 +134,12 @@ public override bool HandleExport( ExportCharsetScreenInfo Info, TextBox EditOut
134134

135135

136136

137+
private void checkWrapAtMaxChars_CheckedChanged( object sender, EventArgs e )
138+
{
139+
editWrapCharCount.Enabled = checkWrapAtMaxChars.Checked;
140+
}
141+
142+
143+
137144
}
138145
}

0 commit comments

Comments
 (0)