Skip to content

Commit

Permalink
Changed a magic mystery value from 24 to 16.
Browse files Browse the repository at this point in the history
There was a logic bug in MOJOSHADER_parsePreshader() that was fixed in the
merge, but it caused this mystery value to be wrong (before, we would step
too far in an array and this value was covering for it).

We still don't know what's at the end of this array, but at least we aren't
crashing now and it appears to work as well as before. It's still a mystery.
  • Loading branch information
icculus committed May 29, 2016
1 parent 83f1052 commit 8f24a1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mojoshader_effects.c
Expand Up @@ -723,7 +723,7 @@ static void readlargeobjects(const uint32 numlargeobjects,
*/
object->shader.is_preshader = 1;
const uint32 start = *((uint32 *) *ptr) + 4;
const uint32 end = 24; // FIXME: Why? -flibit
const uint32 end = 16; // FIXME: Why? -flibit
const char *array = readstring(*ptr, 0, m, d);
object->shader.param_count = 1;
object->shader.params = (uint32 *) m(sizeof (uint32), d);
Expand Down

0 comments on commit 8f24a1d

Please sign in to comment.