Commit 25ca6e21 authored by Sergey Litvinov's avatar Sergey Litvinov
Browse files

use snprintf

parent d27e8554
......@@ -114,7 +114,7 @@ void mesh_write_particles(MeshWrite *q, MPI_Comm comm, const Coords *coords, int
nv = q->nv; nt = q->nt; tt = q->tt; directory = q->directory;
n = nv * nc;
if (sprintf(path, PATTERN, DUMP_BASE, directory, id) < 0)
if (snprintf(path, FILENAME_MAX, PATTERN, DUMP_BASE, directory, id) < 0)
ERR("sprintf failed");
UC(write_file_open(comm, path, /**/ &f));
switch (q->shift_type) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment