--- freem/src/expr.c 2025/03/24 04:13:11 1.10 +++ freem/src/expr.c 2025/03/30 01:36:58 1.11 @@ -1,5 +1,5 @@ /* - * $Id: expr.c,v 1.10 2025/03/24 04:13:11 snw Exp $ + * $Id: expr.c,v 1.11 2025/03/30 01:36:58 snw Exp $ * expression parser * * @@ -24,6 +24,9 @@ * along with FreeM. If not, see . * * $Log: expr.c,v $ + * Revision 1.11 2025/03/30 01:36:58 snw + * Make it easier to bring back fma_gedit, fix double-free in global handler, limit $CHAR to 7-bit ASCII + * * Revision 1.10 2025/03/24 04:13:11 snw * Replace action macro dat with fra_dat to avoid symbol conflict on OS/2 * @@ -1678,7 +1681,9 @@ uparrow: case 'c': /* $CHARACTER */ - { + { + char chrtmp[256]; + long pnum; short l, l1, m, n; l1 = f; @@ -1689,6 +1694,15 @@ uparrow: n = 1; l = 0; + stcpy (chrtmp, a); + stcnv_m2c (chrtmp); + pnum = atol (chrtmp); + + if (pnum > 127) { + merr_raise (MXNUM); + return; + } + for (;;) { if ((ch = a[i++]) == EOL) {