Commit a99835f 1 parent 227ef42 commit a99835f Copy full SHA for a99835f
File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -39,11 +39,15 @@ void bc_translate_init() {
39
39
languagePath = fallbackLanguagePath;
40
40
}
41
41
42
- std::ifstream langstream (bc_file_absolute_path (languagePath.c_str ()));
42
+ const char * languageAbsPath = bc_file_absolute_path (languagePath.c_str ());
43
+ std::ifstream langstream (languageAbsPath);
43
44
languageJson = json::parse (langstream);
44
45
45
- std::ifstream fallbacklangstream (bc_file_absolute_path (fallbackLanguagePath.c_str ()));
46
+ const char * fallbackLanguageAbsPath = bc_file_absolute_path (fallbackLanguagePath.c_str ());
47
+ std::ifstream fallbacklangstream (fallbackLanguageAbsPath);
46
48
fallbackLanguageJson = json::parse (fallbacklangstream);
47
49
48
- free (settings);
50
+ delete languageAbsPath;
51
+ delete fallbackLanguageAbsPath;
52
+ delete settings;
49
53
}
You can’t perform that action at this time.
0 commit comments