aboutsummaryrefslogtreecommitdiff
path: root/sdl2/image
diff options
context:
space:
mode:
Diffstat (limited to 'sdl2/image')
-rw-r--r--sdl2/image/image.ha4
1 files changed, 2 insertions, 2 deletions
diff --git a/sdl2/image/image.ha b/sdl2/image/image.ha
index 32f8f3d..b4af99e 100644
--- a/sdl2/image/image.ha
+++ b/sdl2/image/image.ha
@@ -27,7 +27,7 @@ export @symbol("IMG_Quit") fn IMG_Quit() void;
// Load an image from a file path.
export fn IMG_Load(file: str) (*sdl2::SDL_Surface | sdl2::error) = {
- const file = c::fromstr(file);
+ const file = c::fromstr(file)!;
defer free(file);
return sdl2::wrapptr(_IMG_Load(file))?: *sdl2::SDL_Surface;
};
@@ -40,7 +40,7 @@ export fn IMG_LoadTexture(
SDL_Renderer: *sdl2::SDL_Renderer,
file: str,
) (*sdl2::SDL_Texture | sdl2::error) = {
- const file = c::fromstr(file);
+ const file = c::fromstr(file)!;
defer free(file);
return sdl2::wrapptr(_IMG_LoadTexture(SDL_Renderer, file))?: *sdl2::SDL_Texture;
};