We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dcac822 commit 4f132ffCopy full SHA for 4f132ff
library.cpp
@@ -113,7 +113,7 @@ namespace io2
113
if (str == "*all" || str == "*a")
114
{
115
auto _size = static_cast<size_t>(size());
116
- string _str(readbytes(_size), 0, _size + 1);
+ string _str(readbytes(_size), 0, _size);
117
vares.push_back({lua, sol::in_place, _str});
118
}
119
else if (str == "*l")
@@ -124,7 +124,7 @@ namespace io2
124
else if (arg.is<lua_Integer>())
125
126
auto n = arg.as<lua_Integer>();
127
- string str(readbytes(n), 0, n + 1);
+ string str(readbytes(n), 0, n);
128
if (stream.eof())
129
vares.push_back({lua, sol::in_place, sol::nil});
130
vares.push_back({lua, sol::in_place, str});
0 commit comments