From 3a2c047f953b6b929295efa78cba8064d8cd5da3 Mon Sep 17 00:00:00 2001 From: Mathieu Hofman Date: Thu, 15 Dec 2022 15:37:01 +0000 Subject: [PATCH] Revert "XS: fuzzilli 38" This reverts commit 2511eda9781bf4cb750a88282bced0a1d4f12fcc. --- xs/sources/xsArray.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/xs/sources/xsArray.c b/xs/sources/xsArray.c index fbcfe8af19..f59e33d745 100644 --- a/xs/sources/xsArray.c +++ b/xs/sources/xsArray.c @@ -2340,13 +2340,9 @@ void fx_Array_prototype_sort(txMachine* the) mxTypeError("compare is no function"); } } - if (function) - fxSortArrayItems(the, function, C_NULL, fxGetArrayLength(the, mxThis)); - else { - if (array) - array = fxCheckArrayItems(the, array, 0, array->value.array.length); - fxSortArrayItems(the, function, array, fxGetArrayLength(the, mxThis)); - } + if (array) + array = fxCheckArrayItems(the, array, 0, array->value.array.length); + fxSortArrayItems(the, function, array, fxGetArrayLength(the, mxThis)); mxResult->kind = mxThis->kind; mxResult->value = mxThis->value; }