Fixed gettenvval when variable is undefined per verilator Issue 5179

This commit is contained in:
David Harris 2024-06-14 07:09:53 -07:00
parent 53477b2c85
commit bfd3c9fe86

View File

@ -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));
}