ItsDeltin / Overwatch-Script-To-Workshop

Converts scripts to Overwatch workshops.
209 stars 26 forks source link

[Bug] Format strings which have Null arguments can fail to decompile #268

Closed CactusPuppy closed 3 years ago

CactusPuppy commented 3 years ago

The text output of a format string such as "{0} - {1} - {2}" will not include later arguments if the argument and all later arguments are Null. For example:

rule("make hud text")
{
    event
    {
        Ongoing - Global;
    }

    actions
    {
        Create HUD Text(All Players(All Teams), String("{0} - {1} - {2}", String("Zone")), Null, Null, Left, 0, Color(White), Color(White),
            Color(White), Visible To and String, Default Visibility);
    }
}

is valid in Overwatch, but the decompiler will go out of bounds and trigger an exception. image