mirror of
https://github.com/OPM/ResInsight.git
synced 2026-09-03 20:53:13 -05:00
transferStaticNNCData() takes the connection count from the INIT file using ecl_nnc_data_get_size(), but iterates the geometry from the grid file using ecl_nnc_geometry_iget(). The two counts were only compared in an assert, which is compiled out in release builds, so an INIT file out of sync with the grid reads past the end of the geometry vector inside resdata. Compare the counts at run time, log a warning and iterate the smaller of the two. Both nncConnections and transmissibilityValuesTemp are filled in the same loop and stay aligned.