Skip to content
This repository has been archived by the owner on Jul 7, 2022. It is now read-only.

Commit

Permalink
fixed crash for missing legacy config
Browse files Browse the repository at this point in the history
  • Loading branch information
PredatorCZ committed Nov 17, 2020
1 parent a3dd518 commit c2f8279
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
v1.11.1
- Fixed crash for first-time users.
v1.11
- More stable library version.
- Fixed incorrect old format additive animations.
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.3)

project(HavokMax VERSION 1.11)
project(HavokMax VERSION 1.11.1)

set (HavokLibLibraryPath ../HavokLib)

Expand Down
5 changes: 5 additions & 0 deletions src/HavokMax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,11 @@ static void LoadLegacyConfig() {

GetPrivateProfileString(prName_.data(), _T("Scale"), _T(""), &group[0],
(DWORD)group.size(), cfgpath.data());

if (!group[0]) {
return;
}

auto &prData = presets[to_string(prName_)];
prData.scale = std::stof(group);

Expand Down

0 comments on commit c2f8279

Please sign in to comment.