mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Fixed gettenvval when variable is undefined per verilator Issue 5179
This commit is contained in:
parent
53477b2c85
commit
bfd3c9fe86
@ -3,5 +3,9 @@
|
|||||||
#include "Vtestbench__Dpi.h"
|
#include "Vtestbench__Dpi.h"
|
||||||
|
|
||||||
const char *getenvval(const char *pszName) {
|
const char *getenvval(const char *pszName) {
|
||||||
|
const char *pszValue = getenv(pszName);
|
||||||
|
if (pszValue == NULL) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
return ((const char *) getenv(pszName));
|
return ((const char *) getenv(pszName));
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user