Correct fix for GitHub issue 19.
This commit is contained in:
parent
020e280a98
commit
b7b77b2e75
|
|
@ -1713,8 +1713,10 @@ template <class T> bool vector4_to_value(const vvp_vector4_t&vec, T&val)
|
|||
break;
|
||||
case BIT4_1:
|
||||
// On overflow, return the maximum value of type T
|
||||
if (msk == 0) return ~msk;
|
||||
res |= msk;
|
||||
if (msk == 0)
|
||||
res = ~msk;
|
||||
else
|
||||
res |= msk;
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue