SQFvm / runtime

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

[BUG] Sorting of nested arrays is broken #185

Open severgun opened 2 years ago

severgun commented 2 years ago

Describe the bug Sorting of nested arrays is broken. Tested at 9fa0a3a3d4a0dbc7084c9e77a6b2b02bb24bd777

To Reproduce

private _pp = [[0,0,3,"Head"],[0,0,4,"Body"],[0,0,1.00125,"LeftArm"],[0,0,1.56359,"RightArm"],[0,0,1.1933,"LeftLeg"],[6.17301,2.05767,1.80874,"RightLeg"],[0,0,1,"#structural"]];
_pp sort false;
_pp

[[0,0,1,"#structural"],[6.17301,2.05767,1.80874,"RightLeg"],[0,0,1.1933,"LeftLeg"],[0,0,1.56359,"RightArm"],[0,0,1.00125,"LeftArm"],[0,0,4,"Body"],[0,0,3,"Head"]]

Expected behavior [[6.17301,2.05767,1.80874,"RightLeg"],[0,0,4,"Body"],[0,0,3,"Head"],[0,0,1.56359,"RightArm"],[0,0,1.1933,"LeftLeg"],[0,0,1.00125,"LeftArm"],[0,0,1,"#structural"]]