Merge pull request #1014 from Azaezel/alpha41/EnumErrata

add safeties for enum math across define boundaries
This commit is contained in:
Brian Roberts 2023-05-03 13:38:23 -05:00 committed by GitHub
commit 3538da30d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 71 additions and 71 deletions

View file

@ -116,12 +116,12 @@ void TSShapeLoader::generateNodeTransform(AppNode* node, F32 t, bool blend, F32
void TSShapeLoader::updateProgress(S32 major, const char* msg, S32 numMinor, S32 minor)
{
// Calculate progress value
F32 progress = (F32)major / NumLoadPhases;
F32 progress = (F32)major / (F32)NumLoadPhases;
const char *progressMsg = msg;
if (numMinor)
{
progress += (minor * (1.0f / NumLoadPhases) / numMinor);
progress += (minor * (1.0f / (F32)NumLoadPhases) / numMinor);
progressMsg = avar("%s (%d of %d)", msg, minor + 1, numMinor);
}