From c39e54b7c6aabf10ab9acf41e590cd9d2c4ea81a Mon Sep 17 00:00:00 2001 From: apio Date: Fri, 23 Dec 2022 10:51:55 +0100 Subject: [PATCH] Make TarStream::read_contents take any pointer as output --- luna/include/luna/TarStream.h | 2 +- luna/src/TarStream.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/luna/include/luna/TarStream.h b/luna/include/luna/TarStream.h index b4f62402..fede39dd 100644 --- a/luna/include/luna/TarStream.h +++ b/luna/include/luna/TarStream.h @@ -32,7 +32,7 @@ class TarStream void rewind(); - usize read_contents(const Entry& entry, char* buf, usize offset, usize length); + usize read_contents(const Entry& entry, void* buf, usize offset, usize length); Result read_contents_as_string(const Entry& entry, usize offset, usize max); diff --git a/luna/src/TarStream.cpp b/luna/src/TarStream.cpp index e5d84a4b..7383ef07 100644 --- a/luna/src/TarStream.cpp +++ b/luna/src/TarStream.cpp @@ -87,7 +87,7 @@ Result TarStream::read_next_entry() return parse_header(&header); } -usize TarStream::read_contents(const Entry& entry, char* buf, usize offset, usize length) +usize TarStream::read_contents(const Entry& entry, void* buf, usize offset, usize length) { if (offset >= entry.size) return 0; if ((length + offset) > entry.size) length = entry.size - offset;