1
0
Fork 0

Fix: [NewGRF] Computed VarAction2 callback results were not always properly masked to 15 bit results.

pull/14121/head
frosch 2025-04-28 13:24:39 +02:00 committed by frosch
parent d90f6f01cc
commit 47b5ca6115
1 changed files with 1 additions and 2 deletions

View File

@ -230,9 +230,8 @@ const SpriteGroup *DeterministicSpriteGroup::Resolve(ResolverObject &object) con
if (this->calculated_result) {
/* nvar == 0 is a special case -- we turn our value into a callback result */
if (value != CALLBACK_FAILED) value = GB(value, 0, 15);
static CallbackResultSpriteGroup nvarzero(0);
nvarzero.result = value;
nvarzero.result = GB(value, 0, 15);
return &nvarzero;
}