diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-15 15:11:20 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-15 15:11:20 (GMT) |
commit | 97f1df827ed1a732688557cd6d34a485feec5148 (patch) | |
tree | 86ff04a0be17a087ffccafe4c797823a05576be8 /generic/tclEncoding.c | |
parent | 572bc81740d3ada2ca3f5dd68159681ef10a9aa4 (diff) | |
parent | 5758c119f8180b9f3f902d157e567a1c2a7f85e0 (diff) | |
download | tcl-97f1df827ed1a732688557cd6d34a485feec5148.zip tcl-97f1df827ed1a732688557cd6d34a485feec5148.tar.gz tcl-97f1df827ed1a732688557cd6d34a485feec5148.tar.bz2 |
Merge trunk
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r-- | generic/tclEncoding.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 820119f..d8767e2 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -116,7 +116,7 @@ typedef struct { * entry in this array is 1, otherwise it is * 0. */ int numSubTables; /* Length of following array. */ - EscapeSubTable subTables[1];/* Information about each EscapeSubTable used + EscapeSubTable subTables[TCLFLEXARRAY];/* Information about each EscapeSubTable used * by this encoding type. The actual size is * as large as necessary to hold all * EscapeSubTables. */ @@ -1992,7 +1992,7 @@ LoadEscapeEncoding( Tcl_DStringFree(&lineString); } - size = sizeof(EscapeEncodingData) - sizeof(EscapeSubTable) + size = offsetof(EscapeEncodingData, subTables) + Tcl_DStringLength(&escapeData); dataPtr = (EscapeEncodingData *)Tcl_Alloc(size); dataPtr->initLen = strlen(init); |