From 4b5e4cd1f21582f5e5fa682ab4e4bff252963468 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 29 Nov 2024 12:55:14 -0500 Subject: Change how types handle metamethods --- stdlib/paths.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'stdlib/paths.c') diff --git a/stdlib/paths.c b/stdlib/paths.c index ee73647d..98bcab56 100644 --- a/stdlib/paths.c +++ b/stdlib/paths.c @@ -89,7 +89,7 @@ public Path_t Path$cleanup(Path_t path) } else { // (../..) -> (../..) i += 1; } - } else if (Text$equal(&component, (Path_t*)(components.data + (i-1)*components.stride))) { // (___/../..) -> (____/../..) + } else if (Text$equal(&component, (Path_t*)(components.data + (i-1)*components.stride), &Text$info)) { // (___/../..) -> (____/../..) i += 1; } else { // (___/foo/..) -> (___) Array$remove_at(&components, I(i), I(2), sizeof(Path_t)); @@ -569,6 +569,7 @@ public const TypeInfo_t Path$info = { .align=__alignof__(Path_t), .tag=TextInfo, .TextInfo={.lang="Path"}, + .metamethods=Text$metamethods, }; // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0 -- cgit v1.2.3