fix: resolve Windows segfaults by using platform-specific path separators

On Windows, module IDs were failing to load because paths were being
constructed with hardcoded forward slashes. Oops...

- Added platform.h to centralize path separator macros.
- Updated build_path in stk.c to use STK_PATH_SEP_STR instead of "/".
- Cleaned up redundant platform logic in module.c.
This commit is contained in:
2026-01-31 19:03:19 +01:00
parent 3a06023265
commit 69b4907ff2
3 changed files with 15 additions and 7 deletions
+12
View File
@@ -0,0 +1,12 @@
#ifndef STK_PLATFORM_H
#define STK_PLATFORM_H
#ifdef _WIN32
#define STK_PATH_SEP '\\'
#define STK_PATH_SEP_STR "\\"
#else
#define STK_PATH_SEP '/'
#define STK_PATH_SEP_STR "/"
#endif
#endif /* STK_PLATFORM_H */