hallatore / Netling

Netling is a load tester client for easy web testing.
MIT License
1.34k stars 210 forks source link

ByteHelpers.ContainsPossibly for byte looks wrong #16

Closed nietras closed 7 years ago

nietras commented 7 years ago

@hallatore fixed bufferPtr is not used nor is value used in this overload see:

https://github.com/hallatore/Netling/blob/master/Netling.Core/Utils/ByteHelpers.cs#L26

hallatore commented 7 years ago

The byte pointer is redundant and a result of copy from the original method. value is used however.

nietras commented 7 years ago

Ah yes, sorry I missed the value, would not have made sense without it. One question, is this the only place you use Unsafe or have you used it in other places?

hallatore commented 7 years ago

I only use it here because I create a Vector<short> from a byte array. Proper way to do it is to create a Vector<byte> from the array and then cast it, but that is too slow :)