Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Error in JSONWorker::FindNextRelevant

Help
SyRinX
2012-02-10
2013-06-12
  • SyRinX
    SyRinX
    2012-02-10

    While trying out libjson, I came across the following error in JSONWorker::FindNextRelevant.

    Compiler: Microsoft Visual C++ 2010
    libjson version: 7.5.0
    Changes in JSONOptions.h: JSON_LIBRARY set to OFF, JSON_DEPRECATED_FUNCTIONS set to OFF

    When parsing an array, I get an error "list iterator not dereferencable". The error is thrown from MS's string class in Program Files\Microsoft Visual Studio 10.0\include\xstring (line 78) in operator*() const.

    To fix the error, change line 145 from
      

    for (json_string::const_iterator p = start + pos; *p; ++p){
    

    to
     

    for (json_string::const_iterator p = start + pos; p != value_t.end(); ++p){
    
     
  • Yikes, I've fixed it, I will have a patched version out in the next day or so.

     
  • Fixed in version 7.5.1, it was taking too long to debug the new features so I made a special release just to fix this bug.