Skip to content

Commit

Permalink
Change sprintf format for numbers in segment headers (#7962)
Browse files Browse the repository at this point in the history
  • Loading branch information
joa-quim authored Oct 22, 2023
1 parent 3175b76 commit 2dadc0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/grdinterpolate.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,9 +632,9 @@ EXTERN_MSC int GMT_grdinterpolate (void *V_API, int mode, void *args) {
So = Out->table[0]->segment[rec]; /* Short hand to this output segment */
if (k == start_k) { /* Set the segment header just once */
if (Si->text && Si->text[row])
sprintf (header, "Location %g,%g %s", Si->data[GMT_X][row], Si->data[GMT_Y][row], Si->text[row]);
sprintf (header, "Location %.12g,%.12g %s", Si->data[GMT_X][row], Si->data[GMT_Y][row], Si->text[row]);
else
sprintf (header, "Location %g,%g", Si->data[GMT_X][row], Si->data[GMT_Y][row]);
sprintf (header, "Location %.12g,%.12g", Si->data[GMT_X][row], Si->data[GMT_Y][row]);
So->header = strdup (header);
}
if (Ctrl->S.active) { /* Want x,y,z[,.....],value output */
Expand Down

0 comments on commit 2dadc0f

Please sign in to comment.