diff --git a/milepost b/milepost index 4b491ee..ffb900d 160000 --- a/milepost +++ b/milepost @@ -1 +1 @@ -Subproject commit 4b491ee94a034d6a5a7d90a6f1a822a3d76b53f0 +Subproject commit ffb900d872a456cc5e7cc1762b1846c0c4df08cd diff --git a/src/main.c b/src/main.c index 46ee168..82ab5f0 100644 --- a/src/main.c +++ b/src/main.c @@ -47,12 +47,11 @@ mg_font orca_font_create(const char* resourcePath) { //NOTE(martin): create default font str8 fontPath = path_executable_relative(mem_scratch(), STR8(resourcePath)); - char* fontPathCString = str8_to_cstring(mem_scratch(), fontPath); - FILE* fontFile = fopen(fontPathCString, "r"); + FILE* fontFile = fopen(fontPath.ptr, "r"); if(!fontFile) { - log_error("Could not load font file '%s': %s\n", fontPathCString, strerror(errno)); + log_error("Could not load font file '%s': %s\n", fontPath.ptr, strerror(errno)); return(mg_font_nil()); } unsigned char* fontData = 0; @@ -315,12 +314,11 @@ void* orca_runloop(void* user) //NOTE: loads wasm module const char* bundleNameCString = "module"; str8 modulePath = path_executable_relative(mem_scratch(), STR8("../app/wasm/module.wasm")); - const char* modulePathCString = str8_to_cstring(mem_scratch(), modulePath); - FILE* file = fopen(modulePathCString, "rb"); + FILE* file = fopen(modulePath.ptr, "rb"); if(!file) { - log_error("Couldn't load wasm module at %s\n", modulePathCString); + log_error("Couldn't load wasm module at %s\n", modulePath.ptr); const char* options[] = {"OK"}; mp_alert_popup("Error",