aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-03-28 17:32:01 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-03-28 17:32:01 -0400
commita8fa8cf1ce7cc61f4857c0a0555419f11170e6f0 (patch)
treef517dfc4bdda05781853f37f5c8f6a60aa925a11 /src
parentbc3667cc3de2a6df699a61b4549037c84f75fe03 (diff)
Use strtok instead of strsep
Diffstat (limited to 'src')
-rw-r--r--src/stdlib/files.c2
1 files changed, 1 insertions, 1 deletions
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);