From 666e49989b88dac36d4e6a5b1e7ac695011b0b36 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Tue, 17 Sep 2019 14:55:39 +0200 Subject: added casting --- src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main.c b/src/main.c index a6b83b4..62cfed2 100644 --- a/src/main.c +++ b/src/main.c @@ -59,8 +59,8 @@ int main(int argc, char *argv[]) unsigned int size_x,size_y; if(args.fit_width > 0) { - args.charsize_x = bitmap.x / args.fit_width; - args.charsize_y = (bitmap.y / bitmap.x) * args.charsize_x * 2; + args.charsize_x = (unsigned int)((float)bitmap.x / (float)args.fit_width); + args.charsize_y = (unsigned int)(((float)bitmap.y / (float)bitmap.x) * (float)args.charsize_x * 2); } /*size_x = args.fit_width; size_y = (unsigned int)(((float)size_x / (float)bitmap.x) * (float)bitmap.y);*/ -- cgit v1.2.3