From dd8a32899b60668b9ad8d4c876413598674a6d36 Mon Sep 17 00:00:00 2001
From: Martin Stjernholm <mast@lysator.liu.se>
Date: Thu, 31 Mar 2011 11:54:30 +0200
Subject: [PATCH] Sort after subtype if objects compare as equal.

---
 src/array.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/array.c b/src/array.c
index 0bfc1e6ff8..3f58f961d5 100644
--- a/src/array.c
+++ b/src/array.c
@@ -1068,6 +1068,8 @@ static int obj_or_func_cmp (const struct svalue *a, const struct svalue *b)
     else
       return a->u.object->prog < b->u.object->prog ? -1 : 1;
   }
+  else if (!res)
+    return a_subtype - b_subtype;
 
   return res;
 }
-- 
GitLab