From e854e78db08a1f442544d0beb30616e5c29cc222 Mon Sep 17 00:00:00 2001 From: Bjorn Kisbye Engsig Date: Thu, 12 Oct 2023 09:11:40 +0000 Subject: [PATCH] Backport ampersand at end of sql fix --- src/rwldynsql.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rwldynsql.c b/src/rwldynsql.c index d6f501cb..8c852de7 100644 --- a/src/rwldynsql.c +++ b/src/rwldynsql.c @@ -11,6 +11,7 @@ * * History * + * bengsig 12-oct-2023 - backport ampersand at end of sql fix * bengsig 25-sep-2023 - ampersand bug fix * bengsig 22-sep-2023 - ampersand needs thread local sql * bengsig 21-sep-2023 - ampersand on integer, double @@ -495,7 +496,7 @@ void rwldynarreplace(rwl_xeqenv *xev // clear flags so we redo everything bic(sq->flags, RWL_SQFLAG_GOTID|RWL_SQLFLAG_IBDONE|RWL_SQLFLAG_IDDONE|RWL_SQLFLAG_BDPRT); - while (in[inpos]) + while (1) { if (avl && inpos == avl->arpos) { @@ -535,6 +536,8 @@ void rwldynarreplace(rwl_xeqenv *xev } // copy next character over yt[ytpos] = in[inpos]; + if (0 == in[inpos]) + break; inpos++; ytpos++; }