mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: replace sprintf with snprintf (MacOS), add note about vfork
This commit is contained in:
committed by
Mark Olesen
parent
ffbd05f72a
commit
83b1ebee6f
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2016-2022 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -234,7 +234,7 @@ void Foam::fileFormats::STLCore::writeBinaryHeader
|
||||
{
|
||||
// STL header with extra information about nTris
|
||||
char header[STLHeaderSize];
|
||||
sprintf(header, "STL binary file %u facets", nTris);
|
||||
::snprintf(header, STLHeaderSize, "STL binary file %u facets", nTris);
|
||||
|
||||
// Fill trailing with zeroes (to avoid writing junk)
|
||||
for (size_t i = strlen(header); i < STLHeaderSize; ++i)
|
||||
|
||||
Reference in New Issue
Block a user