Merge pull request #212 from hackgrid/master

skelatool64: Avoid truncate warning in CFileDefinition
This commit is contained in:
lambertjamesd 2023-08-14 10:28:58 -06:00 committed by GitHub
commit adff490004
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -322,8 +322,8 @@ std::string CFileDefinition::GetUniqueName(std::string requestedName) {
int index = 1;
while (mUsedNames.find(result) != mUsedNames.end()) {
char strBuffer[8];
snprintf(strBuffer, 8, "_%d", index);
char strBuffer[12];
snprintf(strBuffer, 12, "_%d", index);
result = mPrefix + "_" + requestedName + strBuffer;
makeCCompatible(result);
++index;
@ -465,4 +465,4 @@ std::shared_ptr<ExtendedMesh> CFileDefinition::GetExtendedMesh(aiMesh* mesh) {
BoneHierarchy& CFileDefinition::GetBoneHierarchy() {
return mBoneHierarchy;
}
}