ea9e2618b7
explicitly casting positions to long, since that is what the code expects.
40 lines
1.5 KiB
Text
40 lines
1.5 KiB
Text
$NetBSD: patch-ab,v 1.3 2006/01/03 09:45:57 joerg Exp $
|
|
|
|
--- lib/TResourceFile.cc.orig 2006-01-03 09:18:35.000000000 +0000
|
|
+++ lib/TResourceFile.cc
|
|
@@ -62,7 +62,7 @@ TResourceFile::TResourceFile( fpstream *
|
|
int repeat;
|
|
do {
|
|
repeat = 0;
|
|
- if (basePos <= (streamSize - (long)sizeof(THeader)))
|
|
+ if (basePos <= ((long)streamSize - sizeof(THeader)))
|
|
{
|
|
stream->seekg(basePos, ios::beg);
|
|
stream->readBytes(&header, sizeof(THeader));
|
|
@@ -172,7 +172,7 @@ void TResourceFile::put(TStreamable *ite
|
|
p->pos = indexPos;
|
|
stream->seekp(basePos + indexPos, ios::beg);
|
|
*stream << item;
|
|
- indexPos = stream->tellp() - basePos;
|
|
+ indexPos = (long)stream->tellp() - basePos;
|
|
p->size = indexPos - p->pos;
|
|
|
|
modified = True;
|
|
@@ -213,7 +213,7 @@ void doCopyResource(void* item, void* ar
|
|
SwitchInfo* si = (SwitchInfo*)arg;
|
|
|
|
si->sourceStream->seekg(si->oldBasePos + ((TResourceItem*)item)->pos);
|
|
- ((TResourceItem*)item)->pos = si->destStream->tellp() - si->newBasePos;
|
|
+ ((TResourceItem*)item)->pos = (long)si->destStream->tellp() - si->newBasePos;
|
|
|
|
copyStream( si->destStream, si->sourceStream, ((TResourceItem*)item)->size);
|
|
}
|
|
@@ -231,7 +231,7 @@ fpstream* TResourceFile::switchTo( fpstr
|
|
args.destStream = aStream;
|
|
aStream->seekp( args.newBasePos + sizeof(long)*3);
|
|
index->forEach(doCopyResource, &args);
|
|
- indexPos = aStream->tellp() - args.newBasePos;
|
|
+ indexPos = (long)aStream->tellp() - args.newBasePos;
|
|
}
|
|
else
|
|
{
|