We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d5afb26 commit b96c551Copy full SHA for b96c551
src/Lua.zig
@@ -295,7 +295,8 @@ pub fn setCallbacks(self: Self, callbacks: anytype) void {
295
296
// Store instance pointer in userdata if it's a pointer
297
if (is_instance) {
298
- cb.userdata = @ptrCast(@constCast(callbacks));
+ // Ensure the pointer is properly aligned before storing
299
+ cb.userdata = @ptrCast(@alignCast(callbacks));
300
} else {
301
cb.userdata = null;
302
}
0 commit comments