Skip to content

Commit 1edabc1

Browse files
committed
seekg position should be relative to beginning #4413 aleph-us/devs#397
1 parent ed181d9 commit 1edabc1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Foundation/include/Poco/StreamCopier.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ static std::streamsize copyStreamRangeUnbuffered(std::istream& istr, std::ostrea
144144
T len = 0;
145145
if (istr)
146146
{
147-
istr.seekg(rangeStart);
147+
istr.seekg(rangeStart, std::ios_base::beg);
148148
istr.read(buffer.begin(), bufferSize);
149149
std::streamsize n = istr.gcount();
150150
while (n > 0)
@@ -209,7 +209,7 @@ static std::streamsize copyStreamRangeUnbuffered(std::istream& istr, std::ostrea
209209
char c = 0;
210210
if (istr)
211211
{
212-
istr.seekg(rangeStart);
212+
istr.seekg(rangeStart, std::ios_base::beg);
213213
istr.get(c);
214214
while (istr && ostr && (len < rangeLength))
215215
{

0 commit comments

Comments
 (0)