From e5a89e63feb665c476df819f5ce5f247d0068124 Mon Sep 17 00:00:00 2001 From: awkfan77 Date: Thu, 25 Jun 2020 19:33:52 +0100 Subject: [PATCH] Fix onetrueawk#83 (#84) --- b.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/b.c b/b.c index 545fb7d..7174eda 100644 --- a/b.c +++ b/b.c @@ -1105,6 +1105,12 @@ rescan: if (!adjbuf((char **) &buf, &bufsz, bp-buf+1, 100, (char **) &bp, "relex2")) FATAL("out of space for reg expr %.10s...", lastre); if (cc->cc_func(i)) { + /* escape backslash */ + if (i == '\\') { + *bp++ = '\\'; + n++; + } + *bp++ = i; n++; }