From 7ed23dddf56796b97d586d77c351a81ec4f61e81 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 18 Oct 2026 13:38:08 -0500 Subject: [PATCH] Fix $IFS bug. (IFS gets used often enough to be cached, and the cache update was going the wrong way down the function/source call stack, leading to a stale cached version being used after the sh_fcall list in TT.ff got popped.) --- toys/pending/sh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toys/pending/sh.c b/toys/pending/sh.c index a8370121..3b494c15 100644 --- a/toys/pending/sh.c +++ b/toys/pending/sh.c @@ -1003,7 +1003,7 @@ static int utf8chr(char *wc, char *chrs, int *len) static void cache_ifs(char *s, struct sh_fcall *ff) { if (strstart(&s, "IFS=")) - do ff->ifs = s; while ((ff = ff->next) != TT.ff->prev); + do ff->ifs = s; while ((ff = ff->prev) != TT.ff->prev); } // declare -aAilnrux -- 2.39.5