From fad727261be0eddae73837a73463e82d4d65543a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20de=20Souza=20Villa=C3=A7a=20Medeiros?= Date: Sat, 12 Aug 2023 11:52:39 -0300 Subject: [PATCH] fix module loading for Windows --- src/module.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/module.c b/src/module.c index be858a9..1f82299 100644 --- a/src/module.c +++ b/src/module.c @@ -169,7 +169,11 @@ static inline HkString *path_match(HkString *path, HkString *name, HkString *cur static inline bool is_relative(char *filename) { +#ifdef _WIN32 + return filename[0] != DIR_SEP[0] && filename[1] != ':'; +#else return filename[0] != DIR_SEP[0]; +#endif } static inline HkString *get_module_file(HkString *relFile, HkString *currFile)