From 6945d2142278509953aaec670f5cbdaccebda9e9 Mon Sep 17 00:00:00 2001 From: Hannes Mehnert Date: Fri, 9 Nov 2018 01:27:22 +0100 Subject: [PATCH] Vmm_core.drop_super / is_sub_id: fix function (used to assume reverse ordered labels) --- src/vmm_core.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vmm_core.ml b/src/vmm_core.ml index 1edf505..66cd193 100644 --- a/src/vmm_core.ml +++ b/src/vmm_core.ml @@ -47,11 +47,11 @@ let id_of_string str = String.cuts ~sep:"." str let drop_super ~super ~sub = let rec go sup sub = match sup, sub with - | [], xs -> Some (List.rev xs) + | [], xs -> Some xs | _, [] -> None | x::xs, z::zs -> if String.equal x z then go xs zs else None in - go (List.rev super) (List.rev sub) + go super sub let is_sub_id ~super ~sub = match drop_super ~super ~sub with None -> false | Some _ -> true