diff options
| author | navewindre <boneyaard@gmail.com> | 2018-09-04 19:10:21 +0200 |
|---|---|---|
| committer | navewindre <boneyaard@gmail.com> | 2018-09-04 19:10:21 +0200 |
| commit | cf4d2ec1a220d70bcfb6490a1a4e23dc8d90886b (patch) | |
| tree | 1912481d1e12f45c50105484f3bbc1f69b285557 /internal_rewrite/simple_settings.hpp | |
| parent | 39f70b7b843d926eeb534ac1de25cc38b13c493d (diff) | |
gay
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_; }
|
