From 05ffb2ce9f4a0cbaca05a1d46b040743d661ce25 Mon Sep 17 00:00:00 2001 From: Determinant Date: Tue, 11 Jun 2019 00:03:23 -0400 Subject: ... --- src/stream.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/stream.cpp b/src/stream.cpp index 9ad41aa..3e24292 100644 --- a/src/stream.cpp +++ b/src/stream.cpp @@ -83,6 +83,14 @@ bytearray_t *bytearray_new_moved_from_datastream(datastream_t *_moved_src) { return res; } +char *datastream_get_hex(datastream_t *self) { + std::string tmp = self->get_hex(); + auto res = (char *)malloc(tmp.length() + 1); + memmove(res, tmp.c_str(), tmp.length()); + res[tmp.length()] = 0; + return res; +} + } #endif -- cgit v1.2.3-70-g09d2