diff --git a/CMakeLists.txt b/CMakeLists.txt index b45420e..9a177c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.7) project (mastobotmon - VERSION 0.3.3 + VERSION 0.3.4 LANGUAGES CXX) include(GNUInstallDirs) diff --git a/README.md b/README.md index a1a8eba..6680100 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ * Tested OS: Linux * C++ compiler (tested: gcc 6.4, clang 5.0) * [cmake](https://cmake.org/) (tested: 3.9.6) - * [mastodon-cpp](https://github.com/tastytea/mastodon-cpp) (at least: 0.6.0) + * [mastodon-cpp](https://github.com/tastytea/mastodon-cpp) (at least: 0.8.6) * [jsoncpp](https://github.com/open-source-parsers/jsoncpp) (tested: 1.8.1) ## Get sourcecode diff --git a/src/account.cpp b/src/account.cpp index 50cc8e7..71ddee0 100644 --- a/src/account.cpp +++ b/src/account.cpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include "version.hpp" #include "mastobotmon.hpp" diff --git a/src/mastobotmon.cpp b/src/mastobotmon.cpp index 49c7e9d..5c43e7d 100644 --- a/src/mastobotmon.cpp +++ b/src/mastobotmon.cpp @@ -134,7 +134,8 @@ int main(int argc, char *argv[]) uint16_t ret = acc.get(Mastodon::API::v1::accounts_verify_credentials, answer); if (ret == 0) { - if (std::stoi(acc.get_header("X-RateLimit-Remaining")) < 2) + if (!acc.get_header("X-RateLimit-Remaining").empty() && + std::stoi(acc.get_header("X-RateLimit-Remaining")) < 2) { cerr << "ERROR: Reached limit of API calls.\n"; cerr << "Counter will reset at " << acc.get_header("X-RateLimit-Reset") << '\n'; diff --git a/src/mastobotmon.hpp b/src/mastobotmon.hpp index a639019..7f0d339 100644 --- a/src/mastobotmon.hpp +++ b/src/mastobotmon.hpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include using std::uint16_t; using std::string;