mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
aeebe8519d
commit
a2f9f0c8bf
1 changed files with 1 additions and 1 deletions
|
@ -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++;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue