diff options
| author | Christopher Li <sparse@chrisli.org> | 2014-10-25 17:05:52 +0800 |
|---|---|---|
| committer | Christopher Li <sparse@chrisli.org> | 2014-10-25 17:10:13 +0800 |
| commit | c1c3f969fbd0d05ad24ab037defde500e7b3c77a (patch) | |
| tree | b238a3844066d19e43ff21de91bdc00836718589 | |
| parent | 71e642abf7129b553521df8dddf4511383016a78 (diff) | |
| download | sparse-dev-c1c3f969fbd0d05ad24ab037defde500e7b3c77a.tar.gz | |
teach next_designators() use array_element_offset()
I miss a spot when converting array size caculation using
array_element_offet(). "next_designators()" is still using
"n*bit_size" to caculate the element offset. It is wrong
for the case of bool array.
Signed-off-by: Christopher Li <sparse@chrisli.org>
| -rw-r--r-- | evaluate.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2380,7 +2380,7 @@ static struct expression *next_designators(struct expression *old, old->ctype, e, v); if (!copy) { n = old->idx_to + 1; - if (n * old->ctype->bit_size == ctype->bit_size) { + if (array_element_offset(old->ctype->bit_size, n) == ctype->bit_size) { convert_index(old); return NULL; } |
