aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2019-09-17 14:55:39 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2019-09-17 14:55:39 +0200
commit666e49989b88dac36d4e6a5b1e7ac695011b0b36 (patch)
treecd39ad82b7d5bc29b44b6b255ff479ccaecd3cb3 /src/main.c
parent99cf1aea86c6a414604cf9eb06588f01bd8a30ef (diff)
downloadAsciiMap-666e49989b88dac36d4e6a5b1e7ac695011b0b36.tar.gz
added casting
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);*/