From 3854bef8b853a369c4fc3a39abff5e2e9cd77625 Mon Sep 17 00:00:00 2001 From: Omniscient Date: Tue, 5 Mar 2024 21:27:34 +1100 Subject: why is it crashing on file loading now? --- src/platform/file.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/platform/file.c') diff --git a/src/platform/file.c b/src/platform/file.c index 44aa9d0..4eeee46 100644 --- a/src/platform/file.c +++ b/src/platform/file.c @@ -12,6 +12,7 @@ const char *string_from_file(const char *path) { FILE *f = fopen(path, "rb"); + printf("Hello\n"); if (f == NULL) { ERROR("Error reading file: %s. errno: %d", path, errno); return NULL; @@ -20,6 +21,7 @@ const char *string_from_file(const char *path) { ERROR("Error reading file: %s. errno: %d", path, errno); return NULL; } + printf("Hello2\n"); fseek(f, 0, SEEK_END); long fsize = ftell(f); rewind(f); @@ -29,6 +31,8 @@ const char *string_from_file(const char *path) { fclose(f); string[fsize] = '\0'; + printf("Hello3\n"); + printf("Hello %s\n", string); return string; } @@ -60,4 +64,4 @@ str8_opt str8_from_file(arena *a, str8 path) { result.has_value = true; return result; -} \ No newline at end of file +} -- cgit v1.2.3-70-g09d2