From 71643a5d69ffc40882c9fcde3cc8a3bcf02d7396 Mon Sep 17 00:00:00 2001 From: t Date: Sat, 13 Jun 2026 23:22:46 -0600 Subject: fix a pointer-casting bug --- src/tui_app.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/tui_app.zig') diff --git a/src/tui_app.zig b/src/tui_app.zig index e14afb1..1182777 100644 --- a/src/tui_app.zig +++ b/src/tui_app.zig @@ -1777,7 +1777,9 @@ const TuiPresenter = struct { }; fn presenter(self: *TuiPresenter) panto.Presenter { - return .{ .ptr = self, .vtable = &vtable }; + // The callbacks cast `ptr` back to `*App`, so erase the `*App` + // (not the `*TuiPresenter` wrapper) into the vtable pointer. + return .{ .ptr = self.app, .vtable = &vtable }; } }; -- cgit v1.3