Re: [Quickfix-users] Re: New Bugs Found (this will also fix case 3)
Brought to you by:
orenmnero
|
From: Oren M. <ore...@ya...> - 2003-12-03 20:17:49
|
Michael,
Thanks for these contributions and your detailed
explanations of your thought process. I will take a
look at these and see about incorporating them.
--oren
--- Michael Holm <mh...@li...> wrote:
> 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;
>
> std::string::size_type startPos = buffer.find(
> "\0019=", 0 );
> // if( pos == std::string::npos ) return false;
> <-------------------------------------- This is
> checking pos when it should be startPos
> if( startPos == std::string::npos ) return false;
> startPos += 3;
> std::string::size_type endPos = buffer.find(
> "\001", startPos );
> //if( pos == std::string::npos ) return false;
> <--------------------------------------- This is
> checking pos when it should be endPos
> if( endPos == std::string::npos ) return false;
> pos = endPos + 1;
>
> std::string strLength( buffer, startPos, endPos -
> startPos );
>
> try
> {
> length = 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
>
>
>
-------------------------------------------------------
> This SF.net email is sponsored by OSDN's Audience
> Survey.
> Help shape OSDN's sites and tell us what you think.
> Take this
> five minute survey and you could win a $250 Gift
> Certificate.
> http://www.wrgsurveys.com/2003/osdntech03.php?site=8
> _______________________________________________
> Quickfix-users mailing list
> Qui...@li...
>
https://lists.sourceforge.net/lists/listinfo/quickfix-users
__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
|