From a8fa8cf1ce7cc61f4857c0a0555419f11170e6f0 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 28 Mar 2025 17:32:01 -0400 Subject: Use strtok instead of strsep --- src/stdlib/files.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/stdlib') diff --git a/src/stdlib/files.c b/src/stdlib/files.c index 4420bd12..88265099 100644 --- a/src/stdlib/files.c +++ b/src/stdlib/files.c @@ -43,7 +43,7 @@ public char *resolve_path(const char *path, const char *relative_to, const char char *relative_dir = dirname(GC_strdup(relative_to)); if (!system_path) system_path = "."; char *copy = GC_strdup(system_path); - for (char *dir, *pos = copy; (dir = strsep(&pos, ":")); ) { + for (char *dir, *pos = copy; (dir = strtok(pos, ":")); pos = NULL) { if (dir[0] == '/') { char *resolved = realpath(heap_strf("%s/%s", dir, path), buf); if (resolved) return GC_strdup(resolved); -- cgit v1.2.3