Skip to content

Commit 302ab68

Browse files
committed
Fix: Invalid New Line Hex
1 parent 166eb15 commit 302ab68

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

SharpRISCV.Core/RiscVAssembler.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ public static void ProcessDataLables(string[] code)
190190
{
191191
string extractedString = match.Groups[0].Value;
192192
string data = extractedString.Substring(1, extractedString.Length - 2);
193-
byte[] b = Encoding.ASCII.GetBytes(data);
193+
data = data.Replace("\\n", "\n");
194+
byte[] b = new UTF8Encoding(true).GetBytes(data);
194195
DataSection.Add(b);
195196
DataSection.Add(new byte[] { 0 });
196197
Address.GetAndIncreseAddress(b.Length + 1);

0 commit comments

Comments
 (0)