gosuwachu / s60-json-library

Automatically exported from code.google.com/p/s60-json-library
0 stars 0 forks source link

panic in CJsonObject::ToStringL if iMembers count is 0 #19

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
fix

void CJsonObject::ToStringL(RBuf& aOutputString) const
    {

    RBufAppendL(aOutputString, '{' );

    if (iMembers.Count() != 0)
        {
        for(int i = 0; i < iMembers.Count() - 1; ++i)
            {
            if( iMembers[i] )
                iMembers[i]->ToStringL( aOutputString );
            RBufAppendL(aOutputString, ',' );
            }
        if(iMembers[iMembers.Count() - 1])
            iMembers[iMembers.Count() - 1]->ToStringL( aOutputString );
        }

    RBufAppendL(aOutputString, '}' );
    }

Original issue reported on code.google.com by Roman.Ya...@gmail.com on 11 Feb 2011 at 3:35