Fixed warnings

This commit is contained in:
Robert Osfield
2008-12-18 12:26:14 +00:00
parent de17dad958
commit 215cd5f29b
5 changed files with 55 additions and 36 deletions

View File

@@ -248,7 +248,15 @@ bool trpgModel::Read(trpgReadBuffer &buf, bool hasHandle)
// TerraPage 2.2 will store the unique handle after the type
// we use a different token, so this is backwards compatible.
if(hasHandle) {
buf.Get((int32 &)handle);
int32 tempHandle;
if(buf.Get(tempHandle))
{
handle = tempHandle;
}
else
{
handle = -1;
}
}
else
handle = -1;