shithub: scc

Download patch

ref: 56e56694ff267c2294b3ab20e9a60c05ed9cdf47
parent: 169c191fd3a86d22ae6847311dcd82a6483a4aa9
author: Roberto E. Vargas Caballero <[email protected]>
date: Fri Mar 13 16:51:13 EDT 2015

Correct expression() in cc2

The maximum value of the input value is 7f and not 1f.

--- a/cc2/parser.c
+++ b/cc2/parser.c
@@ -411,7 +411,7 @@
 		error(ESYNTAX);
 
 	do {
-		if ((c = token[0]) > 0x1f || (fun = optbl[c]) == NULL)
+		if ((c = token[0]) > 0x7f || (fun = optbl[c]) == NULL)
 			error(ESYNTAX);
 		(*fun)(token);
 	} while (token = strtok(NULL, "\t"));