From 9996f24d482b5d52dfe8cbf09e858a708852f5f1 Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Fri, 10 Apr 2015 17:13:35 +1000 Subject: [PATCH] * fix ratio calc --- src/database.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/database.c b/src/database.c index 42c3356..6a8e026 100644 --- a/src/database.c +++ b/src/database.c @@ -210,7 +210,7 @@ ratio_from_rec_data(unsigned char * const data) { iw = *((uint16_t *)(data + REC_OFF_IW)); ih = *((uint16_t *)(data + REC_OFF_IH)); - return (iw > 0 && ih > 0) ? (iw / ih) : 0.0; + return (iw > 0 && ih > 0) ? ((float) iw / ih) : 0.0; } int