add sanity check

This commit is contained in:
Axel Kohlmeyer
2022-01-22 16:51:07 -05:00
parent c93fba5e2d
commit d854e58d00

View File

@ -130,6 +130,7 @@ void ReaderNative::skip()
// read chunk and skip them
read_buf(&nchunk, sizeof(int), 1);
if (nchunk < 0) error->one(FLERR,"Dump file is invalid or corrupted");
int n;
for (int i = 0; i < nchunk; i++) {