1
0
Fork 0

Codechange: CALLBACK_FAILED is an internal constant, do not use it as numeric value in VA2 computations.

pull/14121/head
frosch 2025-04-28 13:23:19 +02:00 committed by frosch
parent 30b1eb6e5f
commit d90f6f01cc
1 changed files with 2 additions and 1 deletions

View File

@ -198,9 +198,10 @@ const SpriteGroup *DeterministicSpriteGroup::Resolve(ResolverObject &object) con
if (adjust.variable == 0x7E) { if (adjust.variable == 0x7E) {
const SpriteGroup *subgroup = SpriteGroup::Resolve(adjust.subroutine, object, false); const SpriteGroup *subgroup = SpriteGroup::Resolve(adjust.subroutine, object, false);
if (subgroup == nullptr) { if (subgroup == nullptr) {
value = CALLBACK_FAILED; value = UINT16_MAX;
} else { } else {
value = subgroup->GetCallbackResult(); value = subgroup->GetCallbackResult();
if (value == CALLBACK_FAILED) value = UINT16_MAX;
} }
/* Note: 'last_value' and 'reseed' are shared between the main chain and the procedure */ /* Note: 'last_value' and 'reseed' are shared between the main chain and the procedure */