mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-26 22:55:55 +03:00
Fixed pointer size in ConnectionInterface
This commit is contained in:
parent
39bc7b5c1b
commit
caea5ccb9b
@ -72,9 +72,8 @@ public virtual void OnDisconnected( ConnectionInfo data )
|
||||
|
||||
public void Receive( int bufferSize = 32 )
|
||||
{
|
||||
// #32bit
|
||||
int processed = 0;
|
||||
IntPtr messageBuffer = Marshal.AllocHGlobal( 8 * bufferSize );
|
||||
IntPtr messageBuffer = Marshal.AllocHGlobal( IntPtr.Size * bufferSize );
|
||||
|
||||
try
|
||||
{
|
||||
@ -82,8 +81,7 @@ public void Receive( int bufferSize = 32 )
|
||||
|
||||
for ( int i = 0; i < processed; i++ )
|
||||
{
|
||||
// #32bit
|
||||
ReceiveMessage( Marshal.ReadIntPtr( messageBuffer, i * 8) );
|
||||
ReceiveMessage( Marshal.ReadIntPtr( messageBuffer, i * IntPtr.Size ) );
|
||||
}
|
||||
}
|
||||
finally
|
||||
|
@ -64,9 +64,8 @@ public virtual void OnDisconnected( Connection connection, ConnectionInfo data )
|
||||
|
||||
public void Receive( int bufferSize = 32 )
|
||||
{
|
||||
// #32bit
|
||||
int processed = 0;
|
||||
IntPtr messageBuffer = Marshal.AllocHGlobal( 8 * bufferSize );
|
||||
IntPtr messageBuffer = Marshal.AllocHGlobal( IntPtr.Size * bufferSize );
|
||||
|
||||
try
|
||||
{
|
||||
@ -74,8 +73,7 @@ public void Receive( int bufferSize = 32 )
|
||||
|
||||
for ( int i = 0; i < processed; i++ )
|
||||
{
|
||||
// #32bit
|
||||
ReceiveMessage( Marshal.ReadIntPtr( messageBuffer, i * 8 ) );
|
||||
ReceiveMessage( Marshal.ReadIntPtr( messageBuffer, i * IntPtr.Size ) );
|
||||
}
|
||||
}
|
||||
finally
|
||||
|
Loading…
Reference in New Issue
Block a user