aboutsummaryrefslogtreecommitdiffstats
path: root/z06.c
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2024-05-19 00:36:53 +0200
committerMatěj Cepl <mcepl@cepl.eu>2024-05-19 00:36:53 +0200
commit71d625f730d872791eef74d7999e1be28d5e5c7e (patch)
treee15070e9b9c169165b8d0410bc81851f68addb0f /z06.c
parentadfba3772459ce4261cfd17922271fee3443a7dc (diff)
downloadlout-71d625f730d872791eef74d7999e1be28d5e5c7e.tar.gz
Lout 3.40.
http://jeffreykingston.id.au/lout/lout-3.40.tar.gz
Diffstat (limited to 'z06.c')
-rw-r--r--z06.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/z06.c b/z06.c
index 01b35eb..d49cf30 100644
--- a/z06.c
+++ b/z06.c
@@ -38,7 +38,7 @@
static OBJECT cross_name; /* name of the cr database */
-#define MAX_STACK 200 /* size of parser stacks */
+#define MAX_STACK 250 /* size of parser stacks */
static OBJECT obj_stack[MAX_STACK]; /* stack of objects */
static int otop; /* top of obj_stack */
static OBJECT tok_stack[MAX_STACK]; /* stack of tokens */
@@ -1233,7 +1233,8 @@ BOOLEAN defs_allowed, BOOLEAN transfer_allowed)
env = Parse(&t, encl, FALSE, FALSE);
t = LexGetToken();
res = Parse(&t, encl, FALSE, FALSE);
- env = SetEnv(res, env);
+ /* env = SetEnv(res, env); fails sometimes, below is yukky patch JK */
+ env = SetEnv(res, type(env) == ENV ? env : NULL);
ShiftObj(env, PREV_OBJ);
t = LexGetToken();
EnvReadInsert(file_num(fpos(t)), offset, env);