Reloaded-Project / Reloaded.Memory.SigScan

Simple good performance byte pattern/PE signature scanner, allowing upwards of 5000MB/s per core (30000+MB/s with AVX) on modern hardware.
GNU Lesser General Public License v3.0
81 stars 15 forks source link

AddOffset doesn't append #9

Open JustArion opened 3 months ago

JustArion commented 3 months ago

In PatternScanResult.cs#L35 the Offset is added to the return value, but the current value is never updated in the struct.

According to the summary

Appends to the existing offset if the offset is valid.

Instead, a new instance is returned with the added offset but doesn't update the existing struct the method is a part of.

JustArion commented 3 months ago

The quality of life case is that

somePattern = somePattern.AddOffset(offset);

is more tedious than

somePattern.AddOffset(offset);