Merge pull request #1 from blackgnezdo/blackgnezdo-patch-1

Fix bad bounds check in for loop
This commit is contained in:
Greg Steuck 2020-02-05 08:06:44 -08:00 committed by GitHub
commit 3ed7e7b295
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;