savage13 / SAC-Bugs

Bugs for SAC
1 stars 0 forks source link

writeheader does not work properly #8

Closed savage13 closed 12 years ago

savage13 commented 12 years ago

The following script only changes the header for the read/write command, not the readhdr/writehdr commands

fg seismo write demo.sac write demo1.sac

rh demo.sac ch t1 12.0 lh t1 wh

r demo1.sac ch t1 12.0 lh t1 w over

r demo.sac demo1.sac lh t1 quit

savage13 commented 12 years ago

File pointer did not get put back to the beginning of the file following the reading of the header to determine the byte order.

diff --git a/src/dff/wrsac.c b/src/dff/wrsac.c index 0d9555b..be4a075 100755 --- a/src/dff/wrsac.c +++ b/src/dff/wrsac.c @@ -114,6 +114,7 @@ wrsac(int idfl, if(*nerr != SAC_OK) { goto L_8888; }

savage13 commented 12 years ago

Fixed before 101.6