summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-12-13 23:46:08 -0800
committerKaz Kylheku <kaz@kylheku.com>2019-12-13 23:46:08 -0800
commit9b99753a04e313de340b9ea0d6b914bb30afc473 (patch)
tree1b395b67c95c39bcd6ce44e74af9dca608e8c1c7
parente6bb10aca754794d40ec9f21317ce8922bbcd8a7 (diff)
downloadtxr-9b99753a04e313de340b9ea0d6b914bb30afc473.tar.gz
txr-9b99753a04e313de340b9ea0d6b914bb30afc473.tar.bz2
txr-9b99753a04e313de340b9ea0d6b914bb30afc473.zip
listener: C++ enum issue.
* parser.c (is_balanced_line): don't initialize an "enum state" variable with 0, but with the equivalent enum constant.
-rw-r--r--parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/parser.c b/parser.c
index 312c5476..ba862eb2 100644
--- a/parser.c
+++ b/parser.c
@@ -1157,7 +1157,7 @@ static int is_balanced_line(const wchar_t *line, void *ctx)
break;
case ')': case ']': case '}':
{
- enum state match = 0;
+ enum state match = ST_START;
switch (ch) {
case ')': match = ST_PAR; break;
case ']': match = ST_BKT; break;