Replaced strcpy with more robust osgDB::stringcopyfixedsize() usage.

This commit is contained in:
Robert Osfield
2016-06-25 16:12:32 +01:00
parent ed59753741
commit 94266eee50

View File

@@ -538,7 +538,7 @@ void WriterNodeVisitor::writeMaterials()
}
Lib3dsTextureMap & tex = mat3ds->texture1_map;
strcpy(tex.name, path.c_str());
stringcopyfixedsize(tex.name, path.c_str());
// Here we don't assume anything about initial flags state (actually it is set to LIB3DS_TEXTURE_NO_TILE by lib3DS, but this is subject to change)
if (mat.texture_transparency) tex.flags |= LIB3DS_TEXTURE_ALPHA_SOURCE;
else tex.flags &= ~LIB3DS_TEXTURE_ALPHA_SOURCE;