From: Sam Lidder Date: Sat, 18 Aug 2012 05:39:59 +0000 (-0400) Subject: fix infinite loop bug when reading test cases X-Git-Tag: v0.3.3~7 X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fvimcoder;a=commitdiff_plain;h=6787bf85ff50a6c7832bb122068118f041c8335f fix infinite loop bug when reading test cases - pushing character back onto stream causes stream state to never fail when test cases contain string and/or vector for paramater/return values - simplest case found so far: parameter: string, return: string --- diff --git a/src/com/dogcows/resources/C++Driver b/src/com/dogcows/resources/C++Driver index 9ca8579..60ef873 100644 --- a/src/com/dogcows/resources/C++Driver +++ b/src/com/dogcows/resources/C++Driver @@ -67,10 +67,6 @@ std::istream& operator >> (std::istream& in, std::string& str) } str = s.str(); } - else - { - in.putback(c); - } return in; } @@ -94,10 +90,6 @@ std::istream& operator >> (std::istream& in, std::vector& vec) while (in.good() && std::isspace(in.peek())) in.get(); } } - else - { - in.putback(c); - } return in; }