Skip to content

Commit

Permalink
Merge pull request #3 from astrohr/bugfix
Browse files Browse the repository at this point in the history
Corrected ephemeris selection
  • Loading branch information
9helix authored Sep 30, 2023
2 parents cade7a8 + 923816f commit f253069
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.20)

# project init
project(MPCS VERSION 2.6.1)
project(MPCS VERSION 2.6.2)

# set important vars
set(BUILD_SHARED_LIBS OFF)
Expand Down
9 changes: 6 additions & 3 deletions src/Ephemeris.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,13 @@ int Ephemeris::follow_link()

// get a reference to the first line that contains ephemeris data
std::string data;
for (int i = 0; i < downloaded.size(); i++)
if (!downloaded[i].empty() && downloaded[i][0] == '2')
for (int i = 0; i < downloaded.size(); i++){
if (!downloaded[i].empty() && downloaded[i][0] == '2'){
data = downloaded[i];

break;
}
}

// remove the text from the end of the string
for(int i = data.size()-1; i >=0; i--){
if (isdigit(data[i])){
Expand Down

0 comments on commit f253069

Please sign in to comment.