Tags: vycdev/MemHack
Tags
Refactor WriteAddressValue to simplify type handling The code changes in the `WriteAddressValue` method within the `MemHackLib.PlatformImplementations` namespace in `MemHackLin.cs` remove the conversion of the `value` parameter to a byte array. Instead, the updated implementation directly assigns the `value` to the `data` variable based on its type. Specifically, it checks if `value` is of type `int`, `long`, `short`, or `byte` and assigns `data` as a new `nint` with the corresponding value. If `value` is of an unsupported type, it returns an error message "Unsupported value type." This refactor simplifies the process and eliminates the need for byte array conversion and pinning.