[Quickfix-users] Re: New Bugs Found (this will also fix case 3)
Brought to you by:
orenmnero
From: Michael H. <mh...@li...> - 2003-12-03 10:22:43
|
Please note for some reason the characters "3D" were inserted into my = original post. In Parser.cpp, line 80 See comments bool Parser::extractLength( int& length, std::string::size_type& pos, const std::string& buffer ) throw( MessageParseError& ) { QF_STACK_PUSH(Parser::extractLength) if( !buffer.size() ) return false; =20 std::string::size_type startPos =3D buffer.find( "\0019=3D", 0 ); // if( pos =3D=3D std::string::npos ) return false; = <-------------------------------------- This is checking pos when it = should be startPos if( startPos =3D=3D std::string::npos ) return false; startPos +=3D 3; std::string::size_type endPos =3D buffer.find( "\001", startPos ); //if( pos =3D=3D std::string::npos ) return false; = <--------------------------------------- This is checking pos when it = should be endPos if( endPos =3D=3D std::string::npos ) return false; pos =3D endPos + 1; std::string strLength( buffer, startPos, endPos - startPos ); try { length =3D IntConvertor::convert( strLength ); if( length < 0 ) throw MessageParseError(); } catch( FieldConvertError& ) { throw MessageParseError(); } return true; QF_STACK_POP } If you make these changes you do not have to comment out the code in the = catch statement in Parser::readFixMessage(). Thanks Michael |