Menu

escaping problem fix

Marius B.
2013-06-21
2013-06-21
  • Marius B.

    Marius B. - 2013-06-21

    I didn't find any way to comment on bugs, so I'm writing here.. It's related to bug http://sourceforge.net/p/libjson/bugs/32/ and https://sourceforge.net/p/libjson/bugs/65/

    Crashes, but shouldn't:
    JSONNode json = libjson::parse_unformatted(L"{\"something\":\"text \\" text\"}".c_str());
    JSONNode::json_iterator node = json.find(L"something");

    Notice the backslashed " character.

    Fix would be to add line (don't know if it's fully correct):
    if ((p) == JSON_TEXT('\') && (p + 1) == JSON_TEXT('"')) p++;\

    after line 87 in JSONWorker.cpp

     
  • Marius B.

    Marius B. - 2013-06-21

    Also - no way to comment on bugs, full of spam etc. Do you consider migrating to github or something like that from sourceforge?

     

Log in to post a comment.