diff --git a/inferno/src/inferno/io/file.cpp b/inferno/src/inferno/io/file.cpp index 6b1d4db..4399e27 100644 --- a/inferno/src/inferno/io/file.cpp +++ b/inferno/src/inferno/io/file.cpp @@ -29,14 +29,14 @@ namespace Inferno { } // Allocate memory filled with zeros - auto buffer = std::make_unique(length + 1); + auto buffer = std::make_unique(length); // Fill buffer with file contents file.read(buffer.get(), length); file.close(); // Create string from the buffer and return - return std::string(buffer.get(), length + 1); + return std::string(buffer.get(), length); } }