Fixed memory allocation in detail mesh and memcpy in polymesh copy

This commit is contained in:
Mikko Mononen
2014-06-24 09:30:59 +03:00
parent eacaa87d9a
commit 480f56e94d
2 changed files with 2 additions and 2 deletions

View File

@@ -1537,7 +1537,7 @@ bool rcCopyPolyMesh(rcContext* ctx, const rcPolyMesh& src, rcPolyMesh& dst)
ctx->log(RC_LOG_ERROR, "rcCopyPolyMesh: Out of memory 'dst.flags' (%d).", src.npolys);
return false;
}
memcpy(dst.flags, src.flags, sizeof(unsigned char)*src.npolys);
memcpy(dst.flags, src.flags, sizeof(unsigned short)*src.npolys);
return true;
}