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.
This commit is contained in:
Cary R 2008-04-01 20:23:08 -07:00 committed by Stephen Williams
parent f7e840cd0a
commit bdc48135e5
1 changed files with 2 additions and 2 deletions

View File

@ -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 +