From 32deac08e0439c51810b091350e193136f0d7738 Mon Sep 17 00:00:00 2001 From: Krzosa Karol Date: Sun, 28 Jan 2024 09:09:50 +0100 Subject: [PATCH] TestClexer fix for github ubuntu worker --- core_library/filesystem.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core_library/filesystem.c b/core_library/filesystem.c index 7a86a34..43db952 100644 --- a/core_library/filesystem.c +++ b/core_library/filesystem.c @@ -618,15 +618,17 @@ OS_API OS_Result OS_AppendFile(S8_String path, S8_String string) { } OS_API S8_String OS_ReadFile(MA_Arena *arena, S8_String path) { - // ftell returns insane size if file is a directory **on some machines** KEKW + S8_String result = {}; + + // ftell returns insane size if file is + // a directory **on some machines** KEKW if (OS_IsDir(path)) { - return {}; + return result; } MA_Checkpoint scratch = MA_GetScratch1(arena); path = S8_Copy(scratch.arena, path); - S8_String result = {}; FILE *f = fopen(path.str, "rb"); if (f) { fseek(f, 0, SEEK_END);