summaryrefslogtreecommitdiffstats
path: root/generic/tclClockFmt.c
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2024-05-07 19:04:29 (GMT)
committersebres <sebres@users.sourceforge.net>2024-05-07 19:04:29 (GMT)
commit08964b5dd95a0738137112d24780d2fad6126793 (patch)
tree5a2a679d08dfd7243d7fce488774292f9757782c /generic/tclClockFmt.c
parentd20454e90836982376e2fc227289b950c68291fb (diff)
downloadtcl-08964b5dd95a0738137112d24780d2fad6126793.zip
tcl-08964b5dd95a0738137112d24780d2fad6126793.tar.gz
tcl-08964b5dd95a0738137112d24780d2fad6126793.tar.bz2
closes [a858d95f4bfddafb]: adjust word-token pointer after possible realloc
Diffstat (limited to 'generic/tclClockFmt.c')
-rw-r--r--generic/tclClockFmt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/generic/tclClockFmt.c b/generic/tclClockFmt.c
index 154c8ee..fdac4fb 100644
--- a/generic/tclClockFmt.c
+++ b/generic/tclClockFmt.c
@@ -2307,6 +2307,7 @@ ClockGetOrParseScanFormat(
wordTok->tokWord.start = p;
wordTok->map = &ScnWordTokenMap;
AllocTokenInChain(tok, scnTok, fss->scnTokC, ClockScanToken *);
+ wordTok = tok - 1;
tokCnt++;
}
if (isspace(UCHAR(*p))) {
@@ -3344,6 +3345,7 @@ ClockGetOrParseFmtFormat(
wordTok->tokWord.start = p;
wordTok->map = &FmtWordTokenMap;
AllocTokenInChain(tok, fmtTok, fss->fmtTokC, ClockFormatToken *);
+ wordTok = tok - 1;
tokCnt++;
}
p = Tcl_UtfNext(p);