Fixed stack-use-after-return bug found with -fsanitize

This commit is contained in:
Steven Hugg 2024-11-01 15:24:15 -05:00
parent a6f9c733a1
commit 55e983e5a1

View File

@ -553,8 +553,8 @@ int main2(int argc, const char** argv)
strftime(dstring, sizeof(tstring) - 1, "\"%b %d %Y\"", &t);
strftime(tstring, sizeof(dstring) - 1, "\"%H:%M:%S\"", &t);
compiler->AddDefine(Ident::Unique("__DATE__"), dstring);
compiler->AddDefine(Ident::Unique("__TIME__"), tstring);
compiler->AddDefine(Ident::Unique("__DATE__"), _strdup(dstring));
compiler->AddDefine(Ident::Unique("__TIME__"), _strdup(tstring));
}
// Add runtime module