Skip to content

Commit

Permalink
Handle GMT_IS_DUPLICATE flat to GMT_Open_VirtualFile (#3809)
Browse files Browse the repository at this point in the history
While duplicate is the default, we must still handle the flag so that direction is set correctly.
  • Loading branch information
PaulWessel authored Aug 1, 2020
1 parent fddb841 commit a1bf959
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gmt_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -7527,6 +7527,8 @@ int GMT_Open_VirtualFile (void *V_API, unsigned int family, unsigned int geometr
direction -= GMT_IS_REFERENCE;
the_mode = GMT_IS_REFERENCE;
}
else if (direction & GMT_IS_DUPLICATE) /* This is the default - just remove the mode flag */
direction -= GMT_IS_DUPLICATE;
if (!(direction == GMT_IN || direction == GMT_OUT)) return GMT_NOT_A_VALID_DIRECTION;
if (direction == GMT_IN && data == NULL) return GMT_PTR_IS_NULL;
if (name == NULL) return_error (V_API, GMT_PTR_IS_NULL);
Expand Down

0 comments on commit a1bf959

Please sign in to comment.