summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--autotab.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/autotab.c b/autotab.c
index 278c568..93c3500 100644
--- a/autotab.c
+++ b/autotab.c
@@ -256,14 +256,14 @@ static int fgrep(line_t *list, const char *pattern)
int munge_char(int ch)
{
+ if (ch < 0 || isalnum(ch) || ch == '_')
+ return TOKEN[0];
if (isspace(ch) || iscntrl(ch))
return SPACE[0];
if (strchr("([{<", ch))
return OPGRP[0];
if (strchr(")]}>", ch))
return CLGRP[0];
- if (isalnum(ch) || ch == '_')
- return TOKEN[0];
return PUNCT[0];
}