From bdc48135e5138bc99b0674667e4150f37c77fcb6 Mon Sep 17 00:00:00 2001 From: Cary R Date: Tue, 1 Apr 2008 20:23:08 -0700 Subject: [PATCH] Fix two comparisons in tgt-vvp/eval_expr.c to use correct variable. This patch fixes two comparison that were using the wrong variable to determine when the end of the object had been reached. --- tgt-vvp/eval_expr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tgt-vvp/eval_expr.c b/tgt-vvp/eval_expr.c index 03e43823f..85f9c7075 100644 --- a/tgt-vvp/eval_expr.c +++ b/tgt-vvp/eval_expr.c @@ -1490,7 +1490,7 @@ static struct vector_info draw_number_expr(ivl_expr_t exp, unsigned wid) break; } - for (cnt = 1 ; idx+cnt < wid ; cnt += 1) + for (cnt = 1 ; idx+cnt < nwid ; cnt += 1) if (bits[idx+cnt] != bits[idx]) break; @@ -1620,7 +1620,7 @@ static char *process_octal_codes(const char *in, unsigned width) return out; } - while (idx < str_len) { + while (ridx < str_len) { /* An octal constant always has three digits. */ if (in[ridx] == '\\') { out[idx] = (in[ridx+1]-'0')*64 + (in[ridx+2]-'0')*8 +