summaryrefslogtreecommitdiff
path: root/src/include/regex/regguts.h
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2013-04-04 19:04:57 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2013-04-04 19:48:11 +0300
commitbf2b0a147857f63daa2e5c17eed0169861371af8 (patch)
treec075c53dbb17fddcec93e53c1bd097e5e26af4ff /src/include/regex/regguts.h
parentd7d5832012ae5174707643af1a450d26d3350719 (diff)
Fix crash on compiling a regular expression with more than 32k colors.
Throw an error instead. Backpatch to all supported branches.
Diffstat (limited to 'src/include/regex/regguts.h')
-rw-r--r--src/include/regex/regguts.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/regex/regguts.h b/src/include/regex/regguts.h
index e1e406f4eaa..4e04abfa6f2 100644
--- a/src/include/regex/regguts.h
+++ b/src/include/regex/regguts.h
@@ -148,6 +148,7 @@
typedef short color; /* colors of characters */
typedef int pcolor; /* what color promotes to */
+#define MAX_COLOR 32767 /* max color (must fit in 'color' datatype) */
#define COLORLESS (-1) /* impossible color */
#define WHITE 0 /* default color, parent of all others */