diff options
| author | t <t@tjp.lol> | 2026-06-13 23:22:46 -0600 |
|---|---|---|
| committer | t <t@tjp.lol> | 2026-06-15 15:08:32 -0600 |
| commit | 71643a5d69ffc40882c9fcde3cc8a3bcf02d7396 (patch) | |
| tree | ed9433d73959893f05f592432e26948664a31643 /src/tui_app.zig | |
| parent | 20e6e08a42240aef0b36ecf627cbcde921912071 (diff) | |
fix a pointer-casting bug
Diffstat (limited to 'src/tui_app.zig')
| -rw-r--r-- | src/tui_app.zig | 4 |
1 files changed, 3 insertions, 1 deletions
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 }; } }; |
