fix asset upgrade for arrays
This commit is contained in:
@@ -198,7 +198,10 @@ namespace Gen
|
||||
constexpr char LoadFuncBodyTypeUpgradeMember3[] = R"END( if (bx::strCmp(memberName, "%s") == 0)
|
||||
{
|
||||
auto* fieldPtr = reinterpret_cast<%s*>(objBasePtr + WriteDestinations[j]);
|
||||
isOk = Load(fieldPtr, %u, serializer) && isOk;
|
||||
uint16_t wantedCount = %u;
|
||||
uint16_t existingCount = matchedDef.ChildArraySizes[j];
|
||||
isOk = Load(fieldPtr, bx::min(wantedCount, existingCount), serializer) && isOk;
|
||||
if (existingCount > wantedCount) serializer.Skip((existingCount - wantedCount) * childDef.Size);
|
||||
continue;
|
||||
}
|
||||
)END";
|
||||
|
||||
BIN
tools/minidef.exe
LFS
BIN
tools/minidef.exe
LFS
Binary file not shown.
Reference in New Issue
Block a user