diff options
author | June McEnroe <june@causal.agency> | 2019-03-14 18:46:16 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-03-14 18:46:16 -0400 |
commit | b341c7cd4d2082a6a1e2df052e04f13b3322fa00 (patch) | |
tree | 9a4b5422199dae1c9b2bcbd6864146c9c8296768 | |
parent | Rewrite using SDL (diff) | |
download | wep-b341c7cd4d2082a6a1e2df052e04f13b3322fa00.tar.gz wep-b341c7cd4d2082a6a1e2df052e04f13b3322fa00.zip |
Handle error from SDL_SaveBMP
Diffstat (limited to '')
-rw-r--r-- | dump.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dump.c b/dump.c index 1d3b6dc..86b0df4 100644 --- a/dump.c +++ b/dump.c @@ -43,7 +43,8 @@ int main(int argc, char *argv[]) { if (!cards->surfaces[i]) continue; char name[sizeof("00.bmp")]; snprintf(name, sizeof(name), "%02d.bmp", i); - SDL_SaveBMP(cards->surfaces[i], name); + int error = SDL_SaveBMP(cards->surfaces[i], name); + if (error) return fail("SDL_SaveBMP"); } Cards_Free(cards); |