From 270c3e7090678ddceef343db0b553ddec11277c4 Mon Sep 17 00:00:00 2001 From: Anton Lydike Date: Mon, 29 May 2023 14:21:59 +0100 Subject: [PATCH] assembler: fix bug with zero-termination of strings --- riscemu/assembler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/riscemu/assembler.py b/riscemu/assembler.py index b03e289..c35e85b 100644 --- a/riscemu/assembler.py +++ b/riscemu/assembler.py @@ -227,7 +227,7 @@ class AssemblerDirectives: cls.op_section(token, (token.value,), context) elif op in ("string", "asciiz", "asciz", "ascii"): ASSERT_LEN(args, 1) - cls.add_text(args[0], context, op == "ascii") + cls.add_text(args[0], context, zero_terminate=(op != "ascii")) elif op in DATA_OP_SIZES: size = DATA_OP_SIZES[op] for arg in args: