From cba05480baac933743a5379b04d700f669b719f2 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Mon, 6 Apr 2020 20:13:24 -0400 Subject: [PATCH] Fix clang warning. --- include/verilated.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/verilated.cpp b/include/verilated.cpp index 663080372..94b7ed6b7 100644 --- a/include/verilated.cpp +++ b/include/verilated.cpp @@ -1517,7 +1517,7 @@ const char* vl_mc_scan_plusargs(const char* prefixp) VL_MT_SAFE { if (match.empty()) return NULL; outstr[0] = '\0'; strncat(outstr, match.c_str() + strlen(prefixp) + 1, // +1 to skip the "+" - VL_VALUE_STRING_MAX_WIDTH); + VL_VALUE_STRING_MAX_WIDTH - 1); return outstr; }