Skip to content

Commit

Permalink
Fix parse of commodity namespace from scheme istream.
Browse files Browse the repository at this point in the history
Just ignore 2 instead of ignoring 1 twice. No ifdef required.
  • Loading branch information
jralls committed Aug 4, 2021
1 parent 0bd9033 commit 99eaa81
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions libgnucash/app-utils/gnc-option-impl.hpp
Expand Up @@ -414,14 +414,10 @@ gnc_option_from_scheme (std::istream& iss, OptType& opt)
{
iss.ignore(strlen(commodity_scm_intro) + 1, '"');
std::getline(iss, name_space, '"');
// libc++ doesn't consume the end character, libstdc++ does
#ifdef _LIBCPP_VERSION
iss.ignore(1, '"');
#endif
}
else
name_space = GNC_COMMODITY_NS_CURRENCY;
iss.ignore(1, '"');
iss.ignore(2, '"');
std::getline(iss, mnemonic, '"');

if (type == GncOptionUIType::COMMODITY)
Expand Down

0 comments on commit 99eaa81

Please sign in to comment.