mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Fix sprintf warnings on macOS
The most recent compiler update for macOS marked sprintf as deprecated, so we started getting warnings from all of the places that use it.
This commit is contained in:
parent
35f5646489
commit
797b7657f5
5 changed files with 13 additions and 9 deletions
|
@ -215,7 +215,7 @@ char* String::Render(int format, int* len) const
|
|||
|
||||
*sp++ = '\\';
|
||||
*sp++ = 'x';
|
||||
sprintf(hex_fmt, "%02x", b[i]);
|
||||
snprintf(hex_fmt, 16, "%02x", b[i]);
|
||||
*sp++ = hex_fmt[0];
|
||||
*sp++ = hex_fmt[1];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue