diff --git a/src/Utilities/Patch.h b/src/Utilities/Patch.h index efdee6b6..d86d2832 100644 --- a/src/Utilities/Patch.h +++ b/src/Utilities/Patch.h @@ -42,7 +42,14 @@ struct __declspec(novtable) Patch template static void Apply_TYPED(DWORD offset, std::initializer_list data) { - Patch patch = { offset, data.size(), const_cast(reinterpret_cast(data.begin())) }; + Patch patch = { offset, data.size() * sizeof(T), const_cast(reinterpret_cast(data.begin())) }; + patch.Apply(); + }; + + template + static inline void Apply_RAW(DWORD offset, const char(&str)[Size]) + { + Patch patch = { offset, Size, (byte*)str }; patch.Apply(); };