shithub: scc

Download patch

ref: 986532bfe53fc9b4f4bce07d94039cbebffcdb61
parent: 2498915ac3402a2fc4cd4557aa3e1ea3bf24858d
author: Roberto E. Vargas Caballero <[email protected]>
date: Thu Aug 13 14:13:53 EDT 2015

Fix escape()

Escape() was doing a double increment, discarding the next
character in the output.

--- a/cc1/lex.c
+++ b/cc1/lex.c
@@ -291,8 +291,7 @@
 {
 	int c, base;
 
-	++input->p;
-	switch (*input->p++) {
+	switch (*++input->p) {
 	case '\\': return '\\';
 	case 'a':  return '\a';
 	case 'f':  return '\f';