Internals: Use snprintf for random unique indexes (#7925)
This commit is contained in:
parent
dde8de0a0d
commit
4262aea87c
|
|
@ -126,6 +126,8 @@ Jamie Iles
|
|||
Jan Van Winkel
|
||||
Jean Berniolles
|
||||
Jean-Nicolas Strauss
|
||||
Jeffrey Song
|
||||
jeffrey.song
|
||||
Jens Yuechao Liu
|
||||
Jeremy Bennett
|
||||
Jesse Taube
|
||||
|
|
|
|||
|
|
@ -496,7 +496,7 @@ bool VlRandomizer::next(VlRNG& rngr) {
|
|||
std::string distinctExpr = "(__Vbv (distinct";
|
||||
for (uint32_t i = 0; i < size; ++i) {
|
||||
char hexIdx[12];
|
||||
sprintf(hexIdx, "#x%08x", i);
|
||||
(void)VL_SNPRINTF(hexIdx, sizeof(hexIdx), "#x%08x", i);
|
||||
distinctExpr += " (select " + it->first + " " + hexIdx + ")";
|
||||
}
|
||||
distinctExpr += "))";
|
||||
|
|
|
|||
Loading…
Reference in New Issue