SQFvm / runtime

Custom implementation of the Arma script language SQF
GNU Lesser General Public License v3.0
96 stars 30 forks source link

[BUG] `If` statement partially broken in `development` branch #223

Closed artemoz closed 10 months ago

artemoz commented 10 months ago

if true then {1} works as expected. if (true) then {1} errors out.

To Reproduce if (true) then {1}

Actual

-----------------------------------------------------------------------------------------------------------------------
[ERR] [L1|C0|__commandlinefeed.sqf]     No value found on value stack for right argument.
[FAT] [L1|C0|__commandlinefeed.sqf]     Stacktrace:<  1 of 1> [L1|C0|__commandlinefeed.sqf]     [missionNamespace] [SCOPENAME-EMPTY]
if (true) then {1}
^^

Expected behavior

-----------------------------------------------------------------------------------------------------------------------
[INF] Context dropped with return value `1`.

Additional context Going back over builds on the Action tab: ["SQF-runtime 2.1.0 - Aug 9 2023 15:25:42","sqf-runtime",21,0,"COMMUNITY-9c27227d6eaa5502de2d52c18901f72a5d3aaab4",false,"Windows","x64"] seems to be the last unaffected build; ["SQF-runtime 2.1.0 - Aug 17 2023 20:00:10","sqf-runtime",21,0,"COMMUNITY-665e781e05ba073d64a4ee7c86aa4e1f43348f90",false,"Windows","x64"] seems to be the first affected one; ["SQF-runtime 2.1.0 - Sep 27 2023 21:43:16","sqf-runtime",21,0,"COMMUNITY-ea17a9f1562cd978b40338d98ebf6d0c9917868c",false,"Windows","x64"] is the latest available at this time and it is still affected.