Skip to content

Commit

Permalink
Convert to snprintf.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrood-nrel committed Jul 24, 2024
1 parent f104e71 commit 4d165b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cartOps.C
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ void MeshBlock::writeOBB2(OBB* obc, int bid)
int l, k, j, m, il, ik, ij;
REAL xx[3];

sprintf(intstring, "%d", 100000 + bid);
sprintf(fname, "cbox%s.dat", &(intstring[1]));
snprintf(intstring, sizeof(intstring), "%d", 100000 + bid);
snprintf(fname, sizeof(fname), "cbox%s.dat", &(intstring[1]));
fp = fopen(fname, "w");
fprintf(fp, "TITLE =\"Box file\"\n");
fprintf(fp, "VARIABLES=\"X\",\"Y\",\"Z\"\n");
Expand Down

0 comments on commit 4d165b2

Please sign in to comment.