Changed a magic mystery value from 24 to 16.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 28 May 2016 22:08:22 -0400
changeset 1167 62d88009015d
parent 1166 ba0794ea4172
child 1168 ddd9304d03a8
Changed a magic mystery value from 24 to 16. 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.
mojoshader_effects.c
--- a/mojoshader_effects.c	Sat May 28 16:11:12 2016 -0400
+++ b/mojoshader_effects.c	Sat May 28 22:08:22 2016 -0400
@@ -723,7 +723,7 @@
                  */
                 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);