(svn r27989) -Fix (r27985): VA2 optimisation failed in various special cases:

- nvar=0 is meant to return the calculated result.
  - Missing references resolve to NULL and got identified with the default result.
  - Missing 'break' broke overlapping cases.
  - Splitting into non-overlapping cases could result in more than 256 cases.
This commit is contained in:
frosch
2018-03-11 15:08:51 +00:00
parent c6eb633d18
commit 55a503e6f2
3 changed files with 8 additions and 4 deletions

View File

@@ -252,7 +252,7 @@ const SpriteGroup *DeterministicSpriteGroup::Resolve(ResolverObject &object) con
object.last_value = last_value;
if (this->num_ranges == 0) {
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, true);