Skip to content

Commit

Permalink
Fix logic on when not scan the first ~700 lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
joa-quim committed Dec 4, 2024
1 parent f572a56 commit 0e5bb4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/psconvert.c
Original file line number Diff line number Diff line change
Expand Up @@ -2269,8 +2269,8 @@ EXTERN_MSC int GMT_psconvert (void *V_API, int mode, void *args) {

while (psconvert_file_line_reader (GMT, &line, &line_size, fp) != EOF && n_read_PS_lines < max_PS_lines) {
n_read_PS_lines++;
if (isGMT_PS && !found_EndProlog) { /* The %%EndProlog marks the end of a GMT PS header */
found_EndProlog = strstr(line, "%%EndProlog"); /* Not starting the parsing before finding it saves as scanning ~700 lines */
if (isGMT_PS && Ctrl->O.active && !found_EndProlog) { /* The %%EndProlog marks the end of a GMT PS header */
found_EndProlog = (strstr(line, "%%EndProlog") != NULL); /* Not starting the parsing before finding it saves as scanning ~700 lines */
continue;
}
if (line[0] != '%') { /* Copy any non-comment line, except one containing setpagedevice in the Setup block */
Expand Down

0 comments on commit 0e5bb4b

Please sign in to comment.