Correct check for existence of DateTimeOriginal exif tag

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Robert C. Helling 2014-05-05 11:34:51 +02:00 committed by Dirk Hohndel
parent 8f657ff775
commit 7e43a45293

View file

@ -239,7 +239,7 @@ time_t ShiftImageTimesDialog::epochFromExiv(EXIFInfo *exif)
struct tm tm; struct tm tm;
int year, month, day, hour, min, sec; int year, month, day, hour, min, sec;
if (strlen(exif->DateTime.c_str())) if (strlen(exif->DateTimeOriginal.c_str()))
sscanf(exif->DateTimeOriginal.c_str(), "%d:%d:%d %d:%d:%d", &year, &month, &day, &hour, &min, &sec); sscanf(exif->DateTimeOriginal.c_str(), "%d:%d:%d %d:%d:%d", &year, &month, &day, &hour, &min, &sec);
else else
sscanf(exif->DateTime.c_str(), "%d:%d:%d %d:%d:%d", &year, &month, &day, &hour, &min, &sec); sscanf(exif->DateTime.c_str(), "%d:%d:%d %d:%d:%d", &year, &month, &day, &hour, &min, &sec);