From 7f404483f1ec9b7a745ee8d3f5f385108ca0025a Mon Sep 17 00:00:00 2001 From: mizipzor Date: Fri, 19 Feb 2010 21:24:20 +0100 Subject: [PATCH] fixed (fix as in hack) crash when std::string was used to store a command line argument --- library/argstream/argstream.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/library/argstream/argstream.h b/library/argstream/argstream.h index aa5bdaa49..cdc8e4600 100644 --- a/library/argstream/argstream.h +++ b/library/argstream/argstream.h @@ -635,15 +635,17 @@ namespace // The option and its associated value are removed, the subtle thing // is that someother options might have this associated value too, // which we must invalidate. - s.values_.erase(iter->second); - for (std::map::iterator - jter = s.options_.begin();jter != s.options_.end();++jter) - { - if (jter->second == iter->second) - { - jter->second = s.values_.end(); - } - } + s.values_.erase(iter->second); + + // FIXME this loop seems to crash if a std::string is used as the value + //for (std::map::iterator + // jter = s.options_.begin();jter != s.options_.end();++jter) + //{ + // if (jter->second == iter->second) + // { + // jter->second = s.values_.end(); + // } + //} s.options_.erase(iter); } else