summaryrefslogtreecommitdiff
path: root/src/ccl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ccl.c')
-rw-r--r--src/ccl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ccl.c b/src/ccl.c
index ff9a213..5c5af13 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -73,6 +73,13 @@ void ccladd (int cclp, int ch)
newpos = ind + len;
+ /* For a non-last cclp, expanding the set will overflow and overwrite a
+ * char in the next cclp.
+ * FIXME: Need another allocation scheme for ccl's. */
+ if (cclp != lastccl) {
+ flexfatal(_("internal error: trying to add a char to a non-last ccl.\n"));
+ }
+
if (newpos >= current_max_ccl_tbl_size) {
current_max_ccl_tbl_size += MAX_CCL_TBL_SIZE_INCREMENT;