diff options
author | Omniscient <omniscient.oce@gmail.com> | 2024-03-05 21:27:34 +1100 |
---|---|---|
committer | Omniscient <omniscient.oce@gmail.com> | 2024-03-05 21:27:34 +1100 |
commit | 3854bef8b853a369c4fc3a39abff5e2e9cd77625 (patch) | |
tree | e5836d1917a05932797b9652f568ccd1abe7aa14 /src/platform/file.c | |
parent | 501c44488fb8918efb5f72b8c42690e8197aad31 (diff) |
why is it crashing on file loading now?
Diffstat (limited to 'src/platform/file.c')
-rw-r--r-- | src/platform/file.c | 6 |
1 files changed, 5 insertions, 1 deletions
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 +} |