diff options
| author | Drew DeVault <sir@cmpwn.com> | 2025-01-13 11:03:19 +0100 |
|---|---|---|
| committer | Drew DeVault <sir@cmpwn.com> | 2025-01-13 11:03:29 +0100 |
| commit | 304d7203d19f71efac49422b5b72f1b5e6f89ff8 (patch) | |
| tree | 9673fa92bcd2f033b800c5036f2bff308896cd1f | |
| parent | Add SDL text input wrappers (diff) | |
| download | hare-chip8-304d7203d19f71efac49422b5b72f1b5e6f89ff8.tar.gz | |
sdl2/rwops: assert on allocation failure
| -rw-r--r-- | sdl2/rwops.ha | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sdl2/rwops.ha b/sdl2/rwops.ha index 4605a3a..da5d83d 100644 --- a/sdl2/rwops.ha +++ b/sdl2/rwops.ha @@ -67,7 +67,7 @@ export fn rw_from_handle(in: io::handle) *SDL_RWops = { close = &stream_close, type_ = rwops_type::UNKNOWN, ... - }); + })!; // Assert that we can cram an io::handle into the SDL_RWops struct static assert(size(io::handle) <= size(nullable *u8) * 2); let ptr = &rw.hidden.unknown.data1: *io::handle; |
