summaryrefslogtreecommitdiff
path: root/quote.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-06-02 10:38:54 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-06-02 10:38:54 -0700
commit2dff954903822df000a018e953c479d9c9a9c9f0 (patch)
treebf349daf9e666004fa0dff919bf701ae28711343 /quote.c
parente46fec66ca915a903927e4fd3b1abac15c218f8a (diff)
downloadnasm-2dff954903822df000a018e953c479d9c9a9c9f0.tar.gz
nasm-2dff954903822df000a018e953c479d9c9a9c9f0.tar.bz2
nasm-2dff954903822df000a018e953c479d9c9a9c9f0.zip
quote: be consistent in not using C escapes for bytes
We used numbers in nasm_unquote and C escapes in nasm_quote - use numbers in both places, just in case some C compiler does something weird with '\r' and (especially) '\n'.
Diffstat (limited to 'quote.c')
-rw-r--r--quote.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/quote.c b/quote.c
index 67c78aa..d7a8dd7 100644
--- a/quote.c
+++ b/quote.c
@@ -90,31 +90,31 @@ char *nasm_quote(char *str, size_t len)
*q++ = '\\';
*q++ = c;
break;
- case '\a':
+ case 7:
*q++ = '\\';
*q++ = 'a';
break;
- case '\b':
+ case 8:
*q++ = '\\';
*q++ = 'b';
break;
- case '\t':
+ case 9:
*q++ = '\\';
*q++ = 't';
break;
- case '\n':
+ case 10:
*q++ = '\\';
*q++ = 'n';
break;
- case '\v':
+ case 11:
*q++ = '\\';
*q++ = 'v';
break;
- case '\f':
+ case 12:
*q++ = '\\';
*q++ = 'f';
break;
- case '\r':
+ case 13:
*q++ = '\\';
*q++ = 'r';
break;