summaryrefslogtreecommitdiff
path: root/lib/common/ReadGatherStream.cpp
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-04-28 17:13:34 +0000
committerChris Wilson <chris+github@qwirx.com>2007-04-28 17:13:34 +0000
commitf71cab7197bc0582dcfb3a4320520d8fbe54718b (patch)
tree7fc69213b0805086dbb50f7d1f6ae474120a51ab /lib/common/ReadGatherStream.cpp
parent278b937f6dffbc6b0e5a4a53e0310358acdf1dd5 (diff)
Fix inability to handle streams over 2GB properly. (refs #3)
Diffstat (limited to 'lib/common/ReadGatherStream.cpp')
-rw-r--r--lib/common/ReadGatherStream.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/common/ReadGatherStream.cpp b/lib/common/ReadGatherStream.cpp
index 9ccc3a54..f50e6664 100644
--- a/lib/common/ReadGatherStream.cpp
+++ b/lib/common/ReadGatherStream.cpp
@@ -59,8 +59,9 @@ ReadGatherStream::~ReadGatherStream()
//
// Function
// Name: ReadGatherStream::AddComponent(IOStream *)
-// Purpose: Add a component to this stream, returning the index of this component
-// in the internal list. Use this with AddBlock()
+// Purpose: Add a component to this stream, returning the index
+// of this component in the internal list. Use this
+// with AddBlock()
// Created: 10/12/03
//
// --------------------------------------------------------------------------
@@ -145,10 +146,10 @@ int ReadGatherStream::Read(void *pBuffer, int NBytes, int Timeout)
if(mPositionInCurrentBlock < mBlocks[mCurrentBlock].mLength)
{
// Read!
- int s = mBlocks[mCurrentBlock].mLength - mPositionInCurrentBlock;
+ pos_type s = mBlocks[mCurrentBlock].mLength - mPositionInCurrentBlock;
if(s > bytesToRead) s = bytesToRead;
- int r = mComponents[mBlocks[mCurrentBlock].mComponent]->Read(buffer, s, Timeout);
+ pos_type r = mComponents[mBlocks[mCurrentBlock].mComponent]->Read(buffer, s, Timeout);
// update variables
mPositionInCurrentBlock += r;