Fix: Fix name collision (#5937)

* Fix: Fix name collision

* Fix: Fix possible override

* Fix: Use reentrant providing time function

* Fix: Fix override

* Update AssbinFileWriter.cpp

Revert, not portable.

* Update AssxmlFileWriter.cpp

Revert asctime_r, not portable.
This commit is contained in:
Kim Kulling
2024-12-23 12:23:42 +01:00
committed by GitHub
parent ecc8a1c869
commit 9f3a7e95ab
5 changed files with 11 additions and 14 deletions

View File

@@ -1638,10 +1638,10 @@ void glTF2Importer::ImportEmbeddedTextures(glTF2::Asset &r) {
ext = "bu";
}
const size_t len = strlen(ext);
if (len <= 3) {
strncpy(tex->achFormatHint, ext, len);
}
size_t len = strlen(ext);
if (len > 3) len = 3;
tex->achFormatHint[3] = '\0';
memcpy(tex->achFormatHint, ext, len);
}
}
}