--- freem/src/expr.c 2025/03/24 01:32:22 1.9 +++ freem/src/expr.c 2025/03/30 01:36:58 1.11 @@ -1,5 +1,5 @@ /* - * $Id: expr.c,v 1.9 2025/03/24 01:32:22 snw Exp $ + * $Id: expr.c,v 1.11 2025/03/30 01:36:58 snw Exp $ * expression parser * * @@ -24,6 +24,12 @@ * 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 + * * Revision 1.9 2025/03/24 01:32:22 snw * Guard declaration of time function in expr.c for portability * @@ -561,7 +567,7 @@ var1: case 'd': /* $DATA */ - ch = dat; + ch = fra_dat; glv_fcn: @@ -1675,7 +1681,9 @@ uparrow: case 'c': /* $CHARACTER */ - { + { + char chrtmp[256]; + long pnum; short l, l1, m, n; l1 = f; @@ -1686,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) {