Skip to content

Commit

Permalink
fix download url detection
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoLuis0 committed Apr 28, 2024
1 parent c34f510 commit edf23dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion json.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ namespace JSON {
inline double& get_double(){ return is_double()?std::get<double>(data):throw JSON_Exception("Double",type_name()); }
inline const double& get_double() const { return is_double()?std::get<double>(data):throw JSON_Exception("Double",type_name()); }

inline int get_number_int() const { return is_double()?static_cast<int64_t>(std::get<double>(data)):is_int()?std::get<int64_t>(data):throw JSON_Exception("Number",type_name()); }
inline int64_t get_number_int() const { return is_double()?static_cast<int64_t>(std::get<double>(data)):is_int()?std::get<int64_t>(data):throw JSON_Exception("Number",type_name()); }
inline double get_number_double() const { return is_double()?std::get<double>(data):is_int()?static_cast<double>(std::get<int64_t>(data)):throw JSON_Exception("Number",type_name()); }

inline std::string& get_str(){ return is_str()?std::get<std::string>(data):throw JSON_Exception("String",type_name()); }
Expand Down
2 changes: 1 addition & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ static void updateGZDoom(HINSTANCE hInst){
for(const JSON::Element &asset_e:assets){
const JSON::object_t &asset=asset_e.get_obj();
const std::string &name=asset.at("name").get_str();
if((name.find("Windows")!=std::string::npos)&&(name.find("64bit")!=std::string::npos)&&(name.find(".zip")!=std::string::npos)){
if(((name.find("Windows")!=std::string::npos)||(name.find("windows")!=std::string::npos))&&(name.find("-pdb")==std::string::npos)&&(name.find(".zip")!=std::string::npos)){
found=true;
gzdoom_download_url=asset.at("browser_download_url").get_str();
break;
Expand Down

0 comments on commit edf23dc

Please sign in to comment.