I am looking at ClumpletReader.cpp and I am wondering if the rewind() 
implementation isn't wrong in the face of isc_spb_version3:

void ClumpletReader::rewind()
{
        if (! getBuffer())
        {
                cur_offset = 0;
                spbState = 0;
                return;
        }
        switch (kind)
        {
        case UnTagged:
        case WideUnTagged:
        case SpbStart:
        case SpbSendItems:
        case SpbReceiveItems:
                cur_offset = 0;
                break;
        default:
                if (kind == SpbAttach && getBufferLength() > 0 && 
getBuffer()[0] != 
isc_spb_version1)
                        cur_offset = 2;
                else
                        cur_offset = 1;
        }
        spbState = 0;
}

shouldn't "getBuffer()[0] != isc_spb_version1" be "getBuffer()[0] == 
isc_spb_version" instead?
-- 
Mark Rotteveel

------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to