Skip to content

Commit

Permalink
Log warning instead of silently failing if inih is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Antidote committed Jan 9, 2025
1 parent cff9265 commit b7f3735
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/reader_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ std::string ReaderUtil::GetEncoding(StringView ini_file) {
return ReaderUtil::CodepageToEncoding(atoi(encoding.c_str()));
}
}
#else
Log::Warning("Could not get encoding from ini file, disabled in this liblcf build.");
#endif
return {};
}
Expand All @@ -228,6 +230,8 @@ std::string ReaderUtil::GetEncoding(std::istream& filestream) {
return ReaderUtil::CodepageToEncoding(atoi(encoding.c_str()));
}
}
#else
Log::Warning("Could not get encoding from ini file, disabled in this liblcf build.");
#endif
return {};
}
Expand Down

0 comments on commit b7f3735

Please sign in to comment.