Calling methods on a temporary string uses previous string
Posted: Tue Sep 16, 2025 8:52 pm
Steps to reproduce:
Load this code as zscript.zs lump and start any Doom map with a zombie:
Code loads without errors and warnings (with `developer 2`).
Expected result:
OR a syntax error on loading?
Actual result:
Note: the first Console.Printf, if uncommented, causes a VM abort: `VM execution aborted: tried to read from address zero. In function parameter "self"`
Reproduces on GZDoom 4.14 and the latest master (commit f892a750b "Silence integer division warning").
Reproduces on Manjaro Linux, Linux 6.6.103-3-MANJARO on x86_64, and Debian GNU/Linux 13 (trixie), Linux 6.12.34+rpt-rpi-v8 on aarch64.
Load this code as zscript.zs lump and start any Doom map with a zombie:
Code: Select all
version 4.14
class TestZombie : Zombieman replaces Zombieman
{
override void BeginPlay()
{
//Console.Printf("I'll cause a VM abort".makeLower());
Console.Printf("---------");
Console.Printf("I'M OLD");
Console.Printf("I'm new".makeLower());
}
}
Expected result:
Code: Select all
---------
I'M OLD
i'm new
Actual result:
Code: Select all
---------
I'M OLD
i'm old
Reproduces on GZDoom 4.14 and the latest master (commit f892a750b "Silence integer division warning").
Reproduces on Manjaro Linux, Linux 6.6.103-3-MANJARO on x86_64, and Debian GNU/Linux 13 (trixie), Linux 6.12.34+rpt-rpi-v8 on aarch64.