diff options
Diffstat (limited to 'internal_rewrite/simple_settings.hpp')
| -rw-r--r-- | internal_rewrite/simple_settings.hpp | 6 |
1 files changed, 4 insertions, 2 deletions
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_; }
|
