aboutsummaryrefslogtreecommitdiff
path: root/b.c
diff options
context:
space:
mode:
authorawkfan77 <awkfan77@mailfence.com>2020-06-25 19:33:52 +0100
committerGitHub <noreply@github.com>2020-06-25 21:33:52 +0300
commite5a89e63feb665c476df819f5ce5f247d0068124 (patch)
tree07dea514a6ad0cfc83025852d6eea879523a5c1f /b.c
parentcef51801109a3032c66aa76503a92ce66724725a (diff)
downloadone-true-awk-e5a89e63feb665c476df819f5ce5f247d0068124.tar.gz
Fix onetrueawk#83 (#84)
Diffstat (limited to 'b.c')
-rw-r--r--b.c6
1 files changed, 6 insertions, 0 deletions
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++;
}