diff --git a/src/lib/file.cpp b/src/lib/file.cpp index bfdd245..15a0b45 100644 --- a/src/lib/file.cpp +++ b/src/lib/file.cpp @@ -225,7 +225,7 @@ ErrorOrVoid File::insertString(tiny_utf8::string string){ this->fileStream.read(reinterpret_cast(buffer), this->size.value); - readData = tiny_utf8::string((char *) buffer); + readData = tiny_utf8::string((char *) buffer, 0, this->size.value); readData.insert(readData.begin()+this->cursorPosition, string); this->fileStream.seekg(0);