On 8/23/2019 12:43 AM, Marcel Fabian Krüger wrote:
Hello,

in tex_setmathparm and tex_getmathparm from ltexlib.c, `i` stores the
index of the math parameter to query or set. Given that `i` is obtained
through luaL_checkoption it should never have a invalid value. The
function still check that `i` is in the valid range using the check

         if (i<0 && i>=math_param_last) {
             /* invalid spec, just ignore it  */

I think this is a typo because i>=math_param_last (with
math_param_last=114) implies i>0 and therefore this condition can never
be true. Maybe || could be used instead of && or the check could be
removed entirly.
in luametatex i use this test

        if (i < 0 || j < 0) {

so i'll do that in luatex too

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
_______________________________________________
dev-luatex mailing list
dev-luatex@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-luatex

Reply via email to