From 07b61aa23f83319c6f7d50e6936634cac794a218 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 13 Jan 2010 06:22:01 +0000 Subject: [PATCH] missed \0-9 for the gold numbers from qccx --- tools/qfcc/source/qc-lex.l | 22 ++++++++++++++-------- tools/qfcc/source/struct.c | 2 +- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/tools/qfcc/source/qc-lex.l b/tools/qfcc/source/qc-lex.l index 75d740b73..3e16bb802 100644 --- a/tools/qfcc/source/qc-lex.l +++ b/tools/qfcc/source/qc-lex.l @@ -514,14 +514,20 @@ make_string (char *token, char **end) case '5': case '6': case '7': - for (i = c = 0; i < 3 - && *token >= '0' - && *token <= '7'; i++, token++) { - c *= 8; - c += *token - '0'; + if (!options.qccx_escapes) { + for (i = c = 0; i < 3 + && *token >= '0' + && *token <= '7'; i++, token++) { + c *= 8; + c += *token - '0'; + } + if (!*token) + error (0, "EOF inside quote"); + break; } - if (!*token) - error (0, "EOF inside quote"); + case 8: + case 9: + c = 18 + c - '0'; break; case 'x': c = 0; @@ -621,7 +627,7 @@ make_string (char *token, char **end) break; } } else if (c == quote) { - break;; + break; } if (boldnext) c = c ^ 0x80; diff --git a/tools/qfcc/source/struct.c b/tools/qfcc/source/struct.c index 7e4621979..82595e32a 100644 --- a/tools/qfcc/source/struct.c +++ b/tools/qfcc/source/struct.c @@ -97,7 +97,7 @@ new_struct_field (struct_t *strct, type_t *type, const char *name, if (size > strct->size) strct->size = size; } else { - field->offset = strct->size;; + field->offset = strct->size; strct->size += type_size (type); } field->next = 0;