game runs, vulkan window stays open, world generates

This commit is contained in:
coah
2026-03-19 20:27:21 -05:00
parent fa6b1b209b
commit 8c9b0d7f9a
2 changed files with 10 additions and 1 deletions

View File

@@ -1438,7 +1438,13 @@ HRESULT C4JRender::LoadTextureData(const char *szFilename, D3DXIMAGE_INFO *pSrcI
return E_FAIL;
}
FILE *file = std::fopen(szFilename, "rb");
char fixedPath[1024];
std::strncpy(fixedPath, szFilename, sizeof(fixedPath) - 1);
fixedPath[sizeof(fixedPath) - 1] = '\0';
for (char *p = fixedPath; *p; ++p)
if (*p == '\\') *p = '/';
FILE *file = std::fopen(fixedPath, "rb");
if (file == nullptr)
{
#ifdef _DEBUG