Skip to content

Commit

Permalink
Guard more extensions behind the flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghabry committed May 9, 2024
1 parent 13a5006 commit 5336511
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/game_strings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "game_switches.h"
#include "game_variables.h"
#include "output.h"
#include "player.h"
#include "utils.h"

void Game_Strings::WarnGet(int id) const {
Expand Down Expand Up @@ -186,7 +187,7 @@ StringView Game_Strings::ToFile(Str_Params params, std::string filename, int enc
filename = "Text/" + filename;

// EasyRPG Extension: When "*" is at the end of filename, ".txt" is not appended
if (filename.back() == '*') {
if (Player::HasEasyRpgExtensions() && filename.back() == '*') {
filename.pop_back();
} else {
filename += ".txt";
Expand Down

0 comments on commit 5336511

Please sign in to comment.