From 565c8d6589dbb070610d2803aab325b770aaa0d7 Mon Sep 17 00:00:00 2001 From: nw13slx Date: Sat, 11 Dec 2021 20:02:32 -0500 Subject: [PATCH] use fseek to skip bufs --- src/reader_native_bin.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/reader_native_bin.cpp b/src/reader_native_bin.cpp index 5708ab2bd9..5afcbcf11f 100644 --- a/src/reader_native_bin.cpp +++ b/src/reader_native_bin.cpp @@ -316,6 +316,7 @@ void ReaderNativeBin::read_double_chunk(size_t count) void ReaderNativeBin::skip_buf(size_t size) { - char tmp[size]; - read_buf(tmp, 1, size); + fseek(fp, size, SEEK_CUR); + // detect end-of-file + if (feof(fp)) error->one(FLERR,"Unexpected end of dump file"); } \ No newline at end of file