# HG changeset patch # User Matti Hamalainen # Date 1525909396 -10800 # Node ID 260c413304f332a4e83f6c942d4adcd6d756c1d8 # Parent a602488830fc8399eeb6f8cd2bb34bae0984673c Cleanups. diff -r a602488830fc -r 260c413304f3 tools/gfxconv.c --- a/tools/gfxconv.c Thu May 10 02:25:42 2018 +0300 +++ b/tools/gfxconv.c Thu May 10 02:43:16 2018 +0300 @@ -1031,13 +1031,12 @@ } -int dmWriteBitmap(const char *filename, const DMC64Image *image, const int iformat, const BOOL enableFixUps) +int dmWriteBitmap(const char *filename, const DMC64Image *image, const DMC64ImageFormat *fmt, const BOOL enableFixUps) { FILE *outFile = NULL; Uint8 *buf = NULL; size_t bufSize; int res = DMERR_OK; - const DMC64ImageFormat *fmt = &dmC64ImageFormats[iformat]; dmMsg(1, "Converting to %s format bitmap.\n", fmt->name); if (image->type != fmt->type && enableFixUps) @@ -1780,7 +1779,7 @@ break; case FFMT_BITMAP: - res = dmWriteBitmap(optOutFilename, inC64Image, optOutSubFormat, TRUE); + res = dmWriteBitmap(optOutFilename, inC64Image, &dmC64ImageFormats[optOutSubFormat], TRUE); break; case FFMT_CHAR: