From 188bbb90d6c72c2a8a18964d7bfa6decde605597 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Thu, 13 Jun 2019 13:54:18 +0300 Subject: [PATCH] Bugfix * src/wordsplit.c (_wsplt_store_errctx): Fix typo in the error message. (wsplt_assign_var): Fix a +1 offset of the ws_envidx field. --- src/wordsplit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wordsplit.c b/src/wordsplit.c index b38dde4..d01fd43 100644 --- a/src/wordsplit.c +++ b/src/wordsplit.c @@ -115,7 +115,7 @@ _wsplt_store_errctx (struct wordsplit *wsp, char const *str, size_t len) if (!wsp->ws_errctx) { wsp->ws_error ("%s", - _("memory exhausted while trying to store error subject")); + _("memory exhausted while trying to store error context")); } else { @@ -1185,7 +1185,7 @@ wsplt_assign_var (struct wordsplit *wsp, const char *name, size_t namelen, strcpy(v + namelen, value); wsp->ws_env[wsp->ws_envidx++] = v; } - wsp->ws_env[wsp->ws_envidx++] = NULL; + wsp->ws_env[wsp->ws_envidx] = NULL; return WRDSE_OK; }