From da26e14959a96ba3ee26dbb6925390b503190d32 Mon Sep 17 00:00:00 2001 From: Brendan Punsky Date: Wed, 13 Mar 2019 16:38:02 -0400 Subject: [PATCH] Update path.odin Fix allocator usage for `rel_current` and `rel_between` --- core/path/path.odin | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/path/path.odin b/core/path/path.odin index 7824e849e..fb26eb229 100644 --- a/core/path/path.odin +++ b/core/path/path.odin @@ -81,7 +81,7 @@ ext :: proc(path: string, new := false, allocator := context.allocator) -> strin rel :: proc{rel_between, rel_current}; // returns the relative path from one path to another -rel_between :: proc(from, to: string, allocator := context.temp_allocator) -> string { +rel_between :: proc(from, to: string, allocator := context.allocator) -> string { if from == "" || to == "" do return ""; from = full(from, context.temp_allocator); @@ -190,7 +190,7 @@ rel_between :: proc(from, to: string, allocator := context.temp_allocator) -> st // returns the relative path from the current directory to another path rel_current :: proc(to: string, allocator := context.temp_allocator) -> string { - return inline rel_between(current(allocator), to); + return inline rel_between(current(context.temp_allocator), to, allocator); }