szhambo / rapidjson

Automatically exported from code.google.com/p/rapidjson
MIT License
0 stars 0 forks source link

Error removing last element of object #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Create new object
2.Add some values to it
3.Remove last added value
Source code bellow:
int main(int argc, char* argv[])
{   
    rapidjson::Document doc;
    rapidjson::StringBuffer strBuff(0, 1024);
    rapidjson::Document::AllocatorType& allocator = doc.GetAllocator();
    rapidjson::Value objVal(rapidjson::kObjectType);    
    objVal.AddMember("var1", 123, allocator);   
    objVal.AddMember("var2", "444", allocator);
    objVal.AddMember("var3", 555, allocator);
    objVal.RemoveMember("var3");
    strBuff.Clear();
    rapidjson::PrettyWriter<rapidjson::StringBuffer> writer(strBuff);
    objVal.Accept(writer);
    printf("Created string: %s\n", strBuff.GetString());
    return 0;
}

What is the expected output? What do you see instead?
Expecting ouput of created object as string.
Assert happens, when removing object's member

What version of the product are you using? On what operating system?
Using code from repository, r61
Windows7 x64

Original issue reported on code.google.com by ifedo...@ronasit.com on 29 Feb 2012 at 9:37

GoogleCodeExporter commented 9 years ago

Original comment by milo...@gmail.com on 6 Mar 2012 at 5:24

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r62.

Original comment by milo...@gmail.com on 6 Mar 2012 at 5:31

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r64.

Original comment by milo...@gmail.com on 6 Mar 2012 at 5:36

GoogleCodeExporter commented 9 years ago
Issue 31 has been merged into this issue.

Original comment by milo...@gmail.com on 12 Nov 2012 at 2:25

GoogleCodeExporter commented 9 years ago
Issue 63 has been merged into this issue.

Original comment by milo...@gmail.com on 11 Apr 2013 at 2:45

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 4fdd805c7dbe.

Original comment by milo...@gmail.com on 6 Jun 2014 at 6:04