mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-10 01:57:01 +00:00
sortMerge is broken
Fixes for sortMerge()
This commit is contained in:
@@ -626,14 +626,13 @@ GLOBAL_DATUM_INIT(sortInstance, /datum/sortInstance, new())
|
|||||||
var/val2 = fetchElement(L,cursor2)
|
var/val2 = fetchElement(L,cursor2)
|
||||||
|
|
||||||
while(1)
|
while(1)
|
||||||
if(call(cmp)(val1,val2) < 0)
|
if(call(cmp)(val1,val2) <= 0)
|
||||||
if(++cursor1 >= end1)
|
if(++cursor1 >= end1)
|
||||||
break
|
break
|
||||||
val1 = fetchElement(L,cursor1)
|
val1 = fetchElement(L,cursor1)
|
||||||
else
|
else
|
||||||
moveElement(L,cursor2,cursor1)
|
moveElement(L,cursor2,cursor1)
|
||||||
|
|
||||||
++cursor2
|
|
||||||
if(++cursor2 >= end2)
|
if(++cursor2 >= end2)
|
||||||
break
|
break
|
||||||
++end1
|
++end1
|
||||||
|
|||||||
Reference in New Issue
Block a user