ref: 18644a4682e18842c7b0f8d6f28c2a2356ba142f
parent: c085dfceecb7785e630bc7c42698ddac1438b15b
author: Noam Preil <noam@pixelhero.dev>
date: Wed Nov 30 11:05:21 EST 2022
parse: unrecognized escapes should drop the backslash
--- a/string.c
+++ b/string.c
@@ -97,9 +97,8 @@
Sungetc(stream);
oct[i] = 0;
c = strtol(oct, nil, 8);
- }else if(c >= nelem(esc) || (c = esc[c]) == 0){
- werrstr("unknown escape char '%c'", c);
- goto err;
+ }else if(c <= nelem(esc) && esc[c] != 0){
+ c = esc[c];
}else if(c < 0){
continue;
}