Skip to content

Commit

Permalink
fix(profuis): padding on x86/x64
Browse files Browse the repository at this point in the history
  • Loading branch information
Curve committed May 7, 2024
1 parent 9ecb71c commit 5d8a7e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/profuis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@

namespace profuis
{
static constexpr auto hwnd_offset = simplytest::arch == simplytest::architecture::x64 ? 0x40 : 0x20;
static constexpr auto hwnd_offset = simplytest::arch == simplytest::architecture::x64 ? 0x40 : 0x20;
static constexpr auto state_padding = simplytest::arch == simplytest::architecture::x64 ? 0x04 : 0x00;

struct c_object
{
char padding_00[hwnd_offset];
HWND hwnd;
};

enum class box_state : std::uintptr_t
enum class box_state : std::uint32_t
{
BOX_UNCHECKED = 0x0,
BOX_CHECKED = 0x1,
Expand All @@ -34,6 +35,7 @@ namespace profuis
struct checkable_data
{
box_state state;
char padding[state_padding];
c_object *object;
LPARAM lparam;
RECT client_rect;
Expand Down

0 comments on commit 5d8a7e8

Please sign in to comment.