mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-03 16:29:25 +02:00
Fix for br937.
When writing a string value, vpi_put_value cannot assume the target vector is a multiple of 8 bits wide.
This commit is contained in:
+1
-1
@@ -760,7 +760,7 @@ static vvp_vector4_t from_stringval(const char*str, unsigned wid)
|
||||
unsigned byte = *--cp;
|
||||
int bit;
|
||||
|
||||
for (bit = 0 ; bit < 8 ; bit += 1) {
|
||||
for (bit = 0 ; (bit < 8) && (idx < wid) ; bit += 1) {
|
||||
if (byte & 1)
|
||||
val.set_bit(idx, BIT4_1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user