From cf4d2ec1a220d70bcfb6490a1a4e23dc8d90886b Mon Sep 17 00:00:00 2001 From: navewindre Date: Tue, 4 Sep 2018 19:10:21 +0200 Subject: gay --- internal_rewrite/simple_settings.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'internal_rewrite/simple_settings.hpp') diff --git a/internal_rewrite/simple_settings.hpp b/internal_rewrite/simple_settings.hpp index 6371992..8dcfaca 100644 --- a/internal_rewrite/simple_settings.hpp +++ b/internal_rewrite/simple_settings.hpp @@ -154,10 +154,11 @@ public: taken = true; } + memset( full_path, 0, MAX_PATH ); memcpy( full_path, str, MAX_PATH ); strcat_s< MAX_PATH >( full_path, file ); - simple_load( path, std::to_string( name_ ).c_str( ), &value_, sizeof( value_ ), str ); + simple_load( path, std::to_string( name_ ).c_str( ), &value_, sizeof( value_ ), full_path ); } __declspec( noinline ) void save( const char* path, const char* file ) const override { @@ -173,10 +174,11 @@ public: taken = true; } + memset( full_path, 0, MAX_PATH ); memcpy( full_path, str, MAX_PATH ); strcat_s< MAX_PATH >( full_path, file ); - simple_save( path, std::to_string( name_ ).c_str( ), &value_, sizeof( value_ ), str ); + simple_save( path, std::to_string( name_ ).c_str( ), &value_, sizeof( value_ ), full_path ); } __forceinline operator T&( ) { return value_; } -- cgit v1.2.3