Skip to content

Commit a1bf959

Browse files
authored
Handle GMT_IS_DUPLICATE flat to GMT_Open_VirtualFile (#3809)
While duplicate is the default, we must still handle the flag so that direction is set correctly.
1 parent fddb841 commit a1bf959

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/gmt_api.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7527,6 +7527,8 @@ int GMT_Open_VirtualFile (void *V_API, unsigned int family, unsigned int geometr
75277527
direction -= GMT_IS_REFERENCE;
75287528
the_mode = GMT_IS_REFERENCE;
75297529
}
7530+
else if (direction & GMT_IS_DUPLICATE) /* This is the default - just remove the mode flag */
7531+
direction -= GMT_IS_DUPLICATE;
75307532
if (!(direction == GMT_IN || direction == GMT_OUT)) return GMT_NOT_A_VALID_DIRECTION;
75317533
if (direction == GMT_IN && data == NULL) return GMT_PTR_IS_NULL;
75327534
if (name == NULL) return_error (V_API, GMT_PTR_IS_NULL);

0 commit comments

Comments
 (0)