diff --git a/desktop_version/src/FileSystemUtils.cpp b/desktop_version/src/FileSystemUtils.cpp index 4b49ce64..3a706de1 100644 --- a/desktop_version/src/FileSystemUtils.cpp +++ b/desktop_version/src/FileSystemUtils.cpp @@ -741,6 +741,12 @@ void FILESYSTEM_loadFileToMemory( goto fail; } + if (len == NULL && !addnull) + { + vlog_warn("%s is loaded with len == NULL && !addnull", name); + SDL_assert(0 && "Are you sure you don't want a null terminator to be added to these loaded file contents?"); + } + /* FIXME: Dumb hack to use `special/stdin.vvvvvv` here... * This is also checked elsewhere... grep for `special/stdin`! */ if (SDL_strcmp(name, "levels/special/stdin.vvvvvv") == 0) diff --git a/desktop_version/src/Font.cpp b/desktop_version/src/Font.cpp index 0d7c81c2..1c597433 100644 --- a/desktop_version/src/Font.cpp +++ b/desktop_version/src/Font.cpp @@ -346,7 +346,7 @@ static uint8_t load_font(FontContainer* container, const char* name) unsigned char* charmap = NULL; if (FILESYSTEM_areAssetsInSameRealDir(name_png, name_txt)) { - FILESYSTEM_loadAssetToMemory(name_txt, &charmap, NULL, false); + FILESYSTEM_loadAssetToMemory(name_txt, &charmap, NULL, true); } if (charmap != NULL) {