ecere/Containers/Array: Fixed sorting structs
authorJerome St-Louis <jerome@ecere.com>
Thu, 6 Oct 2016 22:14:52 +0000 (18:14 -0400)
committerJerome St-Louis <jerome@ecere.com>
Sat, 22 Oct 2016 14:02:38 +0000 (10:02 -0400)
ecere/src/com/containers/Array.ec

index 00bdbd1..d792b22 100644 (file)
@@ -392,7 +392,7 @@ public:
    void Sort(bool ascending)
    {
       Class Dclass = class(D);
-      bool byRef = (Dclass.type == systemClass && !Dclass.byValueSystemClass) || Dclass.type == bitClass || Dclass.type == enumClass || Dclass.type == unitClass;
+      bool byRef = (Dclass.type == systemClass && !Dclass.byValueSystemClass) || Dclass.type == bitClass || Dclass.type == enumClass || Dclass.type == unitClass || Dclass.type == structClass;
       _qsortrx(array, count, Dclass.typeSize, (void *)Dclass._vTbl[__ecereVMethodID_class_OnCompare], null, Dclass, !byRef, ascending);
    }
 };