Skip to content

Commit

Permalink
Fix chunky bug introduced in 1.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
tditlu committed Dec 27, 2024
1 parent f25d7b3 commit bcac111
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/amigeconv.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include "formats/sprite.h"
#include "formats/palette.h"

#define AMIGECONV_VERSION "1.0.9"
#define AMIGECONV_VERSION_DATE "2024-12-26"
#define AMIGECONV_VERSION "1.1.0"
#define AMIGECONV_VERSION_DATE "2024-12-27"

typedef enum {
PALETTE_UNKNOWN = 0,
Expand Down
2 changes: 1 addition & 1 deletion src/formats/chunky.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buffer_t *chunky_convert(image_t *const image, const unsigned int depth) {
if (depth != 2 && depth != 4 && depth != 8) { return NULL; }
if ((image->bitmap->size * depth % 8) != 0) { return NULL; }

unsigned int buffer_size = (image->bitmap->size / 8) * depth;
unsigned int buffer_size = depth == 8 ? image->bitmap->size : (image->bitmap->size / 8) * depth;

buffer_t *buffer = buffer_create(buffer_size);
if (!buffer) { return NULL; }
Expand Down

0 comments on commit bcac111

Please sign in to comment.