summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2013-06-05 11:13:58 -0400
committerOri Bernstein <ori@eigenstate.org>2013-06-05 11:13:58 -0400
commitc2f922830897fb3dee6c271860a28985726d7c0f (patch)
treea8153f04318a648c9552ba51908076002443b7fb
parent61bf93a04f438f9ff1273a996b7d8030b1547259 (diff)
downloadmc-c2f922830897fb3dee6c271860a28985726d7c0f.tar.gz
Escape quotes in assembler strings.
-rw-r--r--6/isel.c2
-rw-r--r--libstd/Makefile1
2 files changed, 3 insertions, 0 deletions
diff --git a/6/isel.c b/6/isel.c
index 97ebc4c..6629273 100644
--- a/6/isel.c
+++ b/6/isel.c
@@ -861,6 +861,8 @@ static void writeblob(FILE *fd, char *p, size_t sz)
for (i = 0; i < sz; i++) {
if (i % 60 == 0)
fprintf(fd, "\t.ascii \"");
+ if (p[i] == '"')
+ fprintf(fd, "\\");
if (isprint(p[i]))
fprintf(fd, "%c", p[i]);
else
diff --git a/libstd/Makefile b/libstd/Makefile
index 78cdb01..05d51d2 100644
--- a/libstd/Makefile
+++ b/libstd/Makefile
@@ -1,6 +1,7 @@
MYRLIB=std
MYRSRC= \
alloc.myr \
+ blat.myr \
chartype.myr \
die.myr \
extremum.myr \