Skip to content

Commit

Permalink
Merge pull request #577 from ut-issl/hotfix/handle_enhanced_comment_f…
Browse files Browse the repository at this point in the history
…or_string_in_ini

[Hotfix] Remove enhanced comment and preceding whitespace from str…
  • Loading branch information
suzuki-toshihir0 committed Jan 19, 2024
2 parents 5d273de + 85d3d25 commit 6385e16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.13)
project(S2E
LANGUAGES CXX
DESCRIPTION "S2E: Spacecraft Simulation Environment"
VERSION 7.2.2
VERSION 7.2.3
)

# build config
Expand Down
3 changes: 3 additions & 0 deletions src/library/initialize/initialize_file_access.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ std::string IniAccess::ReadString(const char* section_name, const char* key_name
value = ini_reader_.GetString(section_name, key_name, "NULL");
#endif
// Special characters
// Inline comments
std::regex inline_comment_pattern("\\s*//.*");
value = std::regex_replace(value, inline_comment_pattern, "");
// INI_FILE_DIR
std::string ini_path = INI_FILE_DIR_FROM_EXE;
value = std::regex_replace(value, std::regex("INI_FILE_DIR_FROM_EXE"), ini_path);
Expand Down

0 comments on commit 6385e16

Please sign in to comment.