Fix bad bounds check in for loop

This commit is contained in:
Greg Steuck 2020-02-05 08:05:50 -08:00 committed by GitHub
parent b1114760fc
commit 398d0cb82f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;
case vpiBinStrVal:
for(int bit=31; bit<=0;bit--){
for(int bit=31; bit>=0;bit--){
*cp++ = "01"[ (value>>bit)&1 ];
}
*cp = 0;