diff --git a/src/stdlib_io_npy_load.fypp b/src/stdlib_io_npy_load.fypp index 05c82b1a5..389f24cd2 100644 --- a/src/stdlib_io_npy_load.fypp +++ b/src/stdlib_io_npy_load.fypp @@ -185,6 +185,9 @@ contains integer :: minor + ! stat should be zero if no error occurred + stat = 0 + if (header(1:1) /= magic_number) then stat = 1 msg = "Expected z'93' but got z'"//to_string(ichar(header(1:1)))//"' "//&