diff options
Diffstat (limited to 'src/librui/resources.c')
-rw-r--r-- | src/librui/resources.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/librui/resources.c b/src/librui/resources.c index e55f93c..cd579f4 100644 --- a/src/librui/resources.c +++ b/src/librui/resources.c @@ -294,7 +294,13 @@ int res_create_anim_image_surfaces(const char *name, int *frames, break; } - if (height % *frames) { + if (*frames <= 0) { + printf("Bad frame count (%d)\n", *frames); + result = -9; + goto exit; + } + + if (height % *frames || height < *frames) { printf("Bad image height (%d) for frame count (%d)\n", (int)height, *frames); result = -9; |