Skip to content

Commit

Permalink
Fix unique_ptr type for stream read
Browse files Browse the repository at this point in the history
  • Loading branch information
dvicini authored and njroussel committed Aug 19, 2024
1 parent 06a4859 commit 780074d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/python/stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ MI_PY_EXPORT(Stream) {
s.write(b.c_str(), b.size());
}, D(Stream, write))
.def("read", [](Stream &s, size_t size) {
std::unique_ptr<char> tmp(new char[size]);
std::unique_ptr<char[]> tmp(new char[size]);
s.read((void *) tmp.get(), size);
return nb::bytes(tmp.get(), size);
}, D(Stream, write))
Expand Down

0 comments on commit 780074d

Please sign in to comment.