mirror of
https://github.com/CrowCpp/Crow.git
synced 2024-06-07 21:10:44 +00:00
Fixed bug in r_string: end of string pointer was not updated in the force member function
This could lead to undefined behaviour in the std::string conversion operator, when using the iterator interface (begin() / end()), and the size() member function.
This commit is contained in:
parent
7f3f72441c
commit
29824c84ed
@ -168,9 +168,10 @@ namespace crow
|
||||
return os;
|
||||
}
|
||||
private:
|
||||
void force(char* s, uint32_t /*length*/)
|
||||
void force(char* s, uint32_t length)
|
||||
{
|
||||
s_ = s;
|
||||
e_ = s_ + length;
|
||||
owned_ = 1;
|
||||
}
|
||||
friend rvalue crow::json::load(const char* data, size_t size);
|
||||
|
Loading…
Reference in New Issue
Block a user