|
|
@@ -331,7 +331,7 @@ static bool SafeWriteFmt(HSQUIRRELVM v,SQWRITEFUNC write,SQUserPointer up, const
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
-static bool SafeRead(HSQUIRRELVM v,SQWRITEFUNC read,SQUserPointer up,SQUserPointer dest,SQInteger size)
|
|
|
+static bool SafeRead(HSQUIRRELVM v,SQREADFUNC read,SQUserPointer up,SQUserPointer dest,SQInteger size)
|
|
|
{
|
|
|
if(size && read(up,dest,size) != size) {
|
|
|
v->Raise_Error(_SC("io error, read function failure, the origin stream could be corrupted/trucated"));
|
|
|
@@ -345,7 +345,7 @@ static bool WriteTag(HSQUIRRELVM v,SQWRITEFUNC write,SQUserPointer up,SQUnsigned
|
|
|
return SafeWrite(v,write,up,&tag,sizeof(tag));
|
|
|
}
|
|
|
|
|
|
-static bool CheckTag(HSQUIRRELVM v,SQWRITEFUNC read,SQUserPointer up,SQUnsignedInteger32 tag)
|
|
|
+static bool CheckTag(HSQUIRRELVM v,SQREADFUNC read,SQUserPointer up,SQUnsignedInteger32 tag)
|
|
|
{
|
|
|
SQUnsignedInteger32 t;
|
|
|
_CHECK_IO(SafeRead(v,read,up,&t,sizeof(t)));
|