mirror of
https://github.com/openhwgroup/cvw.git
synced 2025-04-22 12:57:23 -04:00
Fixed gettenvval when variable is undefined per verilator Issue 5179
This commit is contained in:
parent
53477b2c85
commit
bfd3c9fe86
1 changed files with 4 additions and 0 deletions
|
@ -3,5 +3,9 @@
|
|||
#include "Vtestbench__Dpi.h"
|
||||
|
||||
const char *getenvval(const char *pszName) {
|
||||
const char *pszValue = getenv(pszName);
|
||||
if (pszValue == NULL) {
|
||||
return "";
|
||||
}
|
||||
return ((const char *) getenv(pszName));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue