~sircmpwn/koio

48e876a88bee6a3ce9a2bb4cd249ebf8b34fef78 — Drew DeVault 4 years ago 37f3634
Escape strings in generated code
1 files changed, 4 insertions(+), 1 deletions(-)

M tool/main.c
M tool/main.c => tool/main.c +4 -1
@@ 87,10 87,13 @@ int main(int argc, char **argv) {
			if (cols == 1) {
				fprintf(out, "\n\"");
			}
			if (isprint(c)) {
			if (isprint(c) && c != '\"') {
				cols += fprintf(out, "%c", c);
			} else {
				switch (c) {
				case '\"':
					cols += fprintf(out, "\\\"");
					break;
				case '\n':
					cols += fprintf(out, "\\n");
					break;