Fix bad bounds check in for loop

(cherry picked from commit 398d0cb82f)
This commit is contained in:
Greg Steuck 2020-02-05 08:05:50 -08:00 committed by Martin Whitaker
parent 2c0995caca
commit b7c9df2fd5
1 changed files with 1 additions and 1 deletions

View File

@ -595,7 +595,7 @@ void __vpiDecConst::vpi_get_value(p_vpi_value vp)
break; break;
case vpiBinStrVal: case vpiBinStrVal:
for(int bit=31; bit<=0;bit--){ for(int bit=31; bit>=0;bit--){
*cp++ = "01"[ (value>>bit)&1 ]; *cp++ = "01"[ (value>>bit)&1 ];
} }
*cp = 0; *cp = 0;