From a2f9f0c8bf5aaee94d8409e443ac2fd4941a0e73 Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Mon, 27 Oct 2014 21:41:20 +0100 Subject: Compare image times and sample times as signed ints The problem that we were comparing signed and unsigned ints was originally found by Lubomir. As image times can be negative (and the comparison should fail in that case) we need to compared them as signed. Signed-off-by: Robert C. Helling Acked-by: Lubomir I. Ivanov Signed-off-by: Dirk Hohndel --- qt-ui/divelogexportdialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui') diff --git a/qt-ui/divelogexportdialog.cpp b/qt-ui/divelogexportdialog.cpp index 4e00b4e2a..965af494f 100644 --- a/qt-ui/divelogexportdialog.cpp +++ b/qt-ui/divelogexportdialog.cpp @@ -334,7 +334,7 @@ void DiveLogExportDialog::export_depths(const char *filename, const bool selecte int n = dive->dc.samples; struct sample *s = dive->dc.sample; depth.mm = 0; - while (--n >= 0 && s->time.seconds <= picture->offset.seconds) { + while (--n >= 0 && (int32_t)s->time.seconds <= picture->offset.seconds) { depth.mm = s->depth.mm; s++; } -- cgit v1.2.3-70-g09d2