From b076f58a3ccb3e32a123f8f2967240c9c4f3cfba Mon Sep 17 00:00:00 2001 From: Joaquim Date: Thu, 27 Mar 2025 00:47:32 +0000 Subject: [PATCH] This PR seems to fix #8704 (> 1 consecutive rows with wrong number of columns) --- src/gmt_io.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gmt_io.c b/src/gmt_io.c index 14de83a4e0b..fea48073074 100644 --- a/src/gmt_io.c +++ b/src/gmt_io.c @@ -8377,6 +8377,7 @@ struct GMT_DATATABLE *gmtlib_read_table(struct GMT_CTRL *GMT, void *source, unsi while (! (GMT->current.io.status & (GMT_IO_SEGMENT_HEADER | GMT_IO_GAP | GMT_IO_EOF))) { /* Keep going until false or find a new segment header */ if (GMT->current.io.status & GMT_IO_MISMATCH) { In = GMT->current.io.input (GMT, fp, &n_expected_fields, &status); + if (In == NULL) continue; if ((GMT->current.io.status & (GMT_IO_SEGMENT_HEADER | GMT_IO_GAP | GMT_IO_EOF))) break; }