mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-22 05:47:31 +02:00
Handle run-time out-of-bounds access for wire real arrays (issue #556).
(cherry picked from commit 3dda39bce3)
This commit is contained in:
committed by
Martin Whitaker
parent
2b7ee675ee
commit
9ac6154068
@@ -724,6 +724,9 @@ double __vpiArray::get_word_r(unsigned address)
|
|||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (address >= get_size())
|
||||||
|
return 0.0;
|
||||||
|
|
||||||
assert(nets);
|
assert(nets);
|
||||||
vpiHandle word = nets[address];
|
vpiHandle word = nets[address];
|
||||||
struct __vpiRealVar*vsig = dynamic_cast<__vpiRealVar*>(word);
|
struct __vpiRealVar*vsig = dynamic_cast<__vpiRealVar*>(word);
|
||||||
|
|||||||
Reference in New Issue
Block a user