preprocessor expression evaluation differs from non-preprocessor
shis is a case where stack api expressions are accidentally picked out of compressed javascript. this only really pops out as a potential bug in that the old expression parser didn't pick these up AND the modulo operator %
and parentheses are commonly found in complex math expressions.
this makes for some templates that posed no problems in prior versions, failing in Stacks v4.1 when the preprocessor is used in published content.
here are two simple examples that make it relatively easy to see the problem in action.
| ---------------------------------------------------------------------------------| | a!==a%(h/2)&&(a=0>a?a+h:a-h)),-1!==s.indexOf("_cw")&&0>a?a=(a+9999999999*h)%h-(0 | | a!==a% h/2)&&(a=0>a?a+h:a-h)),-1!==s.indexOf("_cw")&&0>a?a=(a+9999999999*h %h-(0 | | ---------------------------------------------------------------------------------| |----------------------------------------------------------------------------------| | =r,a!==a%(r/2)&&(a=0>a?a+r:a-r)),-1!==t.indexOf("_cw")&&0>a?a=(a+99999*r)%r-(0a/ | | =r,a!==a% r/2)&&(a=0>a?a+r:a-r)),-1!==t.indexOf("_cw")&&0>a?a=(a+99999*r %r-(0a/ | |----------------------------------------------------------------------------------|