Skip to content

Commit bc82c22

Browse files
committed
fix precision of aspectratio variable
the var was being truncated too much resulting in a slightly off hex value. this was not a problem in most instances but in certain titles this could result in irregular behavior and crashes.
1 parent cf8e194 commit bc82c22

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

SUWSF/GenericPatch.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <string>
99
#include "../external/tinyexpr/tinyexpr.h"
1010
#include "../external/Hooking.Patterns/Hooking.Patterns.h"
11+
#include <boost/lexical_cast.hpp>
1112

1213
void GenericPatch::Init()
1314
{
@@ -110,7 +111,7 @@ std::vector<GenericPatch::Config> GenericPatch::GetConfigs()
110111
{
111112
boost::replace_all(config.val, "width", std::to_string(UserSettings::config.width));
112113
boost::replace_all(config.val, "height", std::to_string(UserSettings::config.height));
113-
boost::replace_all(config.val, "aspectratio", std::to_string(UserSettings::config.aspectratio));
114+
boost::replace_all(config.val, "aspectratio", boost::lexical_cast<std::string>(UserSettings::config.aspectratio));
114115
int error = -1;
115116
double d = te_interp(config.val.c_str(), &error);
116117

0 commit comments

Comments
 (0)