diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-07-08 12:29:06 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-07-08 12:29:06 -0700 |
commit | f297d9f91e5919c180d15be9562b8e15e6dd368e (patch) | |
tree | 835c8cf943badd99daeca1ab53c10b3d59c0c3a8 /dive.c | |
parent | c054b18b7055473279b7120d334c453d1c0427ec (diff) | |
download | subsurface-f297d9f91e5919c180d15be9562b8e15e6dd368e.tar.gz |
Fix picture loading
Signed vs unsigned comparisons are such a pain. Since we want offsets to
be +/- 30 minutes around the dive we need to allow negative offsets - but
duration_t was defined as uint32_t.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.c')
-rw-r--r-- | dive.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2389,7 +2389,7 @@ void dive_create_picture(struct dive *d, char *filename, int shift_time) picture_load_exif_data(p, ×tamp); if (timestamp) { p->offset.seconds = timestamp - d->when + shift_time; - if (p->offset.seconds < -D30MIN || p->offset.seconds > d->duration.seconds + D30MIN) { + if (p->offset.seconds < -D30MIN || p->offset.seconds > (int)d->duration.seconds + D30MIN) { // this picture doesn't belong to this dive free(p); return; |