diff options
author | Determinant <[email protected]> | 2019-06-11 00:03:23 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2019-06-11 00:03:23 -0400 |
commit | 05ffb2ce9f4a0cbaca05a1d46b040743d661ce25 (patch) | |
tree | 9f13671da0eed9f2c387ec93ff019417f3807b40 /src | |
parent | 299d1a3cf7f7ab2465dccc87dde578044c9b040b (diff) |
...
Diffstat (limited to 'src')
-rw-r--r-- | src/stream.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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 |