Skip to content

Commit

Permalink
In rare cases, reading in a partial line of astrometry led to mangled…
Browse files Browse the repository at this point in the history
… data. Better to read said partial line and then ignore it.
  • Loading branch information
Bill-Gray committed Nov 12, 2024
1 parent 3d66d6c commit 4898baa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions findorb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4354,6 +4354,9 @@ int main( int argc, const char **argv)
if( file_offset < 0L)
file_offset = 0L;
fseek( ifile, file_offset, SEEK_SET);
if( file_offset) /* read and discard partial line */
if( !fgets( tbuff, sizeof( tbuff), ifile))
return( -4);
if( obs)
unload_observations( obs, n_obs);

Expand Down

0 comments on commit 4898baa

Please sign in to comment.