summaryrefslogtreecommitdiffstats
path: root/qt-ui/divelogexportdialog.cpp
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2014-10-27 21:41:20 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-10-27 14:39:00 -0700
commita2f9f0c8bf5aaee94d8409e443ac2fd4941a0e73 (patch)
tree71c32b97987bd5543d08654cac75a75070c318c9 /qt-ui/divelogexportdialog.cpp
parentaeebe8519d31482230edfc7bc0c144032872b663 (diff)
downloadsubsurface-a2f9f0c8bf5aaee94d8409e443ac2fd4941a0e73.tar.gz
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 <helling@atdotde.de> Acked-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divelogexportdialog.cpp')
-rw-r--r--qt-ui/divelogexportdialog.cpp2
1 files changed, 1 insertions, 1 deletions
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++;
}