aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c4
1 files changed, 2 insertions, 2 deletions
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);*/