Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sample_shared/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set(CMAKE_CXX_STANDARD 17)
if(LINUX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")

if(CLANG)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
endif()
endif()
Expand Down
2 changes: 1 addition & 1 deletion source/gameanalytics/GACommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ namespace gameanalytics
class GAState;
}

constexpr const char* GA_VERSION_STR = "cpp 5.2.0";
constexpr const char* GA_VERSION_STR = "cpp 5.3.1";

constexpr int MAX_CUSTOM_FIELDS_COUNT = 50;
constexpr int MAX_CUSTOM_FIELDS_KEY_LENGTH = 64;
Expand Down
1 change: 1 addition & 0 deletions source/gameanalytics/GAState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,7 @@ namespace gameanalytics
catch (json::exception& e)
{
logging::GALogger::e(e.what());
store::GAStore::setState("sdk_config_cached", "");
}
}

Expand Down
14 changes: 12 additions & 2 deletions source/gameanalytics/Platform/GALinux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,19 @@ std::string gameanalytics::GAPlatformLinux::getOSVersion()
std::string version;
int const strSize = strlen(info.release);

int dotCount = 0;
for (size_t i = 0; i < strSize; ++i)
{
if (!isdigit(info.release[i]) && info.release[i] != '.')
{
if (info.release[i] == '.')
{
++dotCount;
if (dotCount == 3)
{
version = std::string(info.release, info.release + i);
break;
}
}
else if (!isdigit(info.release[i]))
{
version = std::string(info.release, info.release + i);
break;
Expand Down
Loading