Skip to content

Commit e945d2c

Browse files
committed
fixup
1 parent ac502c8 commit e945d2c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/world_builder/parameters.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ namespace WorldBuilder
794794
constexpr int n_layers = 9;
795795
float depth_data[40962 * 9];
796796
char tessfile[200];
797-
sprintf(tessfile, "%s/litho_depth_data.bin", litho_1_0_path.c_str());
797+
snprintf(tessfile, 200, "%s/litho_depth_data.bin", litho_1_0_path.c_str());
798798
FILE *fptrb = nullptr;
799799
if ((fptrb = fopen(tessfile, "rb")) == nullptr)
800800
{
@@ -804,8 +804,8 @@ namespace WorldBuilder
804804
WBAssertThrow(ret_code == n1 * n_layers, "Error in reading the Litho1.0 data.");
805805
fclose(fptrb);
806806

807-
sprintf(tessfile, "%s/Icosahedron_Level7_LatLon_mod.txt",
808-
litho_1_0_path.c_str());
807+
snprintf(tessfile, 200, "%s/Icosahedron_Level7_LatLon_mod.txt",
808+
litho_1_0_path.c_str());
809809
FILE *fp = nullptr;
810810
if ((fp = fopen(tessfile, "r")) == nullptr)
811811
{

0 commit comments

Comments
 (0)