Fix T47896: Scripted Expression string length limit is too short for some autogenerated expressions

While most scripted expressions are quite short (e.g. "var" or "frame + 1"),
those that are autogenerated by scripts (to take into account a wide range of factors)
may require a bit more headroom to operate in.

By doubling the maximum length here, we now make it possible to combine up to 38
3-letter variables in some linear combination (with all factors expressed to 4 dp).
That should be more than enough for anyone or anything for quite a while!

Unfortunately, this does increase memory consumption for drivers across the board.
This commit is contained in:
Joshua Leung 2016-03-24 13:02:22 +13:00
parent c1095c7a9f
commit 322f86d6b3

@ -374,7 +374,7 @@ typedef struct ChannelDriver {
/* python expression to execute (may call functions defined in an accessory file)
* which relates the target 'variables' in some way to yield a single usable value
*/
char expression[256]; /* expression to compile for evaluation */
char expression[512]; /* expression to compile for evaluation */
void *expr_comp; /* PyObject - compiled expression, don't save this */
float curval; /* result of previous evaluation */