diff options
author | Tim Schumacher <timschumi@gmx.de> | 2023-04-04 18:29:43 +0200 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2023-04-05 07:30:38 -0400 |
commit | 767fb01a8cf54f0760e5bbf408eb89d67239575d (patch) | |
tree | c1ebcd4b475517fc2df21c83e349a35082e045c9 /AK/CircularBuffer.h | |
parent | 997e745e87608467a8c5bd1f60da871743b1bbb6 (diff) | |
download | serenity-767fb01a8cf54f0760e5bbf408eb89d67239575d.zip |
AK: Report copied bytes when seekback copying from CircularBuffer
Otherwise, we have no way of determining whether our copy was truncated
by accident.
Diffstat (limited to 'AK/CircularBuffer.h')
-rw-r--r-- | AK/CircularBuffer.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/AK/CircularBuffer.h b/AK/CircularBuffer.h index be23b791e4..89861d0215 100644 --- a/AK/CircularBuffer.h +++ b/AK/CircularBuffer.h @@ -33,7 +33,7 @@ public: /// before the current write pointer and allows for reading already-read data. ErrorOr<Bytes> read_with_seekback(Bytes bytes, size_t distance); - ErrorOr<void> copy_from_seekback(size_t distance, size_t length); + ErrorOr<size_t> copy_from_seekback(size_t distance, size_t length); [[nodiscard]] size_t empty_space() const; [[nodiscard]] size_t used_space() const; |