From b5bb6bc707f6ec2114150767d870d33a2139d23f Mon Sep 17 00:00:00 2001 From: anth64 Date: Wed, 5 Nov 2025 07:49:57 +0100 Subject: [PATCH] Fix (*file_list) pointer syntax in Windows code, remove repeated variable, windows code now returns event types --- src/platform.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/platform.c b/src/platform.c index d06ca34..a623c2e 100644 --- a/src/platform.c +++ b/src/platform.c @@ -175,7 +175,6 @@ stk_file_event_t *platform_directory_watch_check(void *handle, DWORD bytes_returned; FILE_NOTIFY_INFORMATION *info; BYTE *event_ptr; - char **file_list; size_t file_count, index; int char_count; BOOL result; @@ -242,14 +241,14 @@ stk_file_event_t *platform_directory_watch_check(void *handle, info->FileNameLength / sizeof(WCHAR), NULL, 0, NULL, NULL); if (char_count > 0) { - (file_list *)[index] = malloc(char_count + 1); + (*file_list)[index] = malloc(char_count + 1); if ((*file_list)[index]) { WideCharToMultiByte(CP_UTF8, 0, info->FileName, info->FileNameLength / sizeof(WCHAR), - (file_list *)[index], + (*file_list)[index], char_count, NULL, NULL); - (file_list *)[index][char_count] = '\0'; + (*file_list)[index][char_count] = '\0'; index++; } } @@ -261,7 +260,7 @@ stk_file_event_t *platform_directory_watch_check(void *handle, } *out_count = index; - return file_list; + return events; #else return NULL; #endif