• Philipp A. Hartmann's avatar
    tutorial.cpp: fix insitu parsing (closes #273) · 953cda14
    Philipp A. Hartmann authored
    The insitu parsing example in the tutorial is using a local char
    buffer inside a nested scope.  After leaving the scope, the
    resulting Document object still references this (now invalid)
    memory locations.
    
    Some compilers reuse this space on the stack for other local
    variables later in the function, corrupting the original document.
    
    Drop the local scope to extend the lifetime of the buffer.
    953cda14
Name
Last commit
Last update
CMakeModules Loading commit data...
bin Loading commit data...
doc Loading commit data...
example Loading commit data...
include/rapidjson Loading commit data...
test Loading commit data...
thirdparty Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
.travis.yml Loading commit data...
CMakeLists.txt Loading commit data...
RapidJSON.pc.in Loading commit data...
RapidJSONConfig.cmake.in Loading commit data...
RapidJSONConfigVersion.cmake.in Loading commit data...
appveyor.yml Loading commit data...
license.txt Loading commit data...
readme.md Loading commit data...
travis-doxygen.sh Loading commit data...