mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Warning fixes (#5275)
* Warning fixes in Robust.Shared * Robust.Client warning fixes * Fix test failure Test failures were due to broken system registrations for the client RobustUnitTest. It was accidentally registering some server systems, which means DebugPhysicsSystem wasn't gettings its dependencies properly. Fixing this meant pulling half a dozen extra dependencies that client ContainerSystem and TransformSystem are supposed to have, but didn't.
This commit is contained in:
committed by
GitHub
parent
b82bc258db
commit
7fbcfeaa8f
@@ -115,7 +115,7 @@ internal static class HappyEyeballsHttp
|
||||
await socket.ConnectAsync(new IPEndPoint(address, port), cancel).ConfigureAwait(false);
|
||||
return socket;
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
// Log.Verbose(e, "Happy Eyeballs to {Address} [{Index}] failed", address, index);
|
||||
socket.Dispose();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using System.Buffers;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Buffers.Binary;
|
||||
using System.Threading;
|
||||
using Lidgren.Network;
|
||||
using SpaceWizards.Sodium;
|
||||
@@ -60,11 +60,10 @@ internal sealed class NetEncryption
|
||||
ciphertext = message.Data = new byte[encryptedSize];
|
||||
}
|
||||
|
||||
// TODO: this is probably broken for big-endian machines.
|
||||
Span<byte> nonceData = stackalloc byte[CryptoAeadXChaCha20Poly1305Ietf.NoncePublicBytes];
|
||||
nonceData.Fill(0);
|
||||
MemoryMarshal.Write(nonceData, ref nonce);
|
||||
MemoryMarshal.Write(ciphertext, ref nonce);
|
||||
BinaryPrimitives.WriteUInt64LittleEndian(nonceData, nonce);
|
||||
BinaryPrimitives.WriteUInt64LittleEndian(ciphertext, nonce);
|
||||
|
||||
CryptoAeadXChaCha20Poly1305Ietf.Encrypt(
|
||||
// ciphertext
|
||||
@@ -93,10 +92,9 @@ internal sealed class NetEncryption
|
||||
var buffer = ArrayPool<byte>.Shared.Rent(cipherText.Length);
|
||||
cipherText.CopyTo(buffer);
|
||||
|
||||
// TODO: this is probably broken for big-endian machines.
|
||||
Span<byte> nonceData = stackalloc byte[CryptoAeadXChaCha20Poly1305Ietf.NoncePublicBytes];
|
||||
nonceData.Fill(0);
|
||||
MemoryMarshal.Write(nonceData, ref nonce);
|
||||
BinaryPrimitives.WriteUInt64LittleEndian(nonceData, nonce);
|
||||
|
||||
var result = CryptoAeadXChaCha20Poly1305Ietf.Decrypt(
|
||||
// plaintext
|
||||
|
||||
Reference in New Issue
Block a user