Commit effb956b authored by Marius Wachtler's avatar Marius Wachtler

getWriteableStringContents: return a pointer (to the 0 byte) even if the string is empty

parent a8af1ea6
......@@ -2093,9 +2093,6 @@ BoxedString* createUninitializedString(ssize_t n) {
}
char* getWriteableStringContents(BoxedString* s) {
if (s->s.size() == 0)
return NULL;
// After doing some reading, I think this is ok:
// http://stackoverflow.com/questions/14290795/why-is-modifying-a-string-through-a-retrieved-pointer-to-its-data-not-allowed
// In C++11, std::string is required to store its data contiguously.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment