Skip to content

Commit ac502c8

Browse files
committed
fixup
1 parent 93e6c1e commit ac502c8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

source/world_builder/parameters.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ namespace WorldBuilder
731731
MAX_LAYERTYPE
732732
};
733733
size_t colon_location = value.find(':');
734-
WBAssertThrow(colon_location!= std::string::npos,"when chosing Litho1.0 you need to specify a subunit with the colon (:)." );
734+
WBAssertThrow(colon_location!= std::string::npos,"when choosing Litho1.0 you need to specify a subunit with the colon (:)." );
735735
std::string rest_of_string = value.substr(colon_location); // TODO: improve and make more robust, look at gwb-dat example
736736
while ((!rest_of_string.empty()) && (rest_of_string[0] == ' '))
737737
rest_of_string.erase(rest_of_string.begin());
@@ -800,7 +800,8 @@ namespace WorldBuilder
800800
{
801801
WBAssertThrow(false, "ERROR: Could not open file " << tessfile);
802802
}
803-
fread(&depth_data, sizeof(float), n1 * n_layers, fptrb);
803+
const size_t ret_code = fread(&depth_data, sizeof(float), n1 * n_layers, fptrb);
804+
WBAssertThrow(ret_code == n1 * n_layers, "Error in reading the Litho1.0 data.");
804805
fclose(fptrb);
805806

806807
sprintf(tessfile, "%s/Icosahedron_Level7_LatLon_mod.txt",

0 commit comments

Comments
 (0)