Page MenuHomeFeedback Tracker

Enscript runtime string bug ... sort of
Assigned, UrgentPublic

Description

I do not really understand what is going on and why - This needs some low level debugging from the Enfusion team. Code to reproduce the issue:

modded class MissionGameplay
{
    string SecondPart()
    {
        return (101).AsciiToString() + "llo World!";
    };

    override void OnMissionStart()
    {
        super.OnMissionStart();

        //First half standalone
        Print((72).AsciiToString());
        //=> SCRIPT       : H

        //Second half stand alone
        Print(SecondPart());
        //=> SCRIPT       : ello World!
        
        //Joining directly
        Print((72).AsciiToString() + SecondPart());
        //=> SCRIPT       : eello World!
        
        //Joining with an empty string
        Print((72).AsciiToString() + "" + SecondPart());
        //=> SCRIPT       : Hello World!
    }
}

The expected behavior would be, that the direct join produces "Hello World!" ... It does not. Instead, it prints the first character of the second part twice. If the second part starts with a different character, then that will be duplicated. It's not just happening with "e".

It seems to work if we insert an empty string in between the join. That last statement produces "Hello World!" as expected.

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General
Additional Information

Please forward to the enfusion team.

Event Timeline

Arkensor created this task.Sep 10 2020, 9:04 PM
Geez changed the task status from New to Assigned.Sep 11 2020, 12:17 PM