Skip to content

Commit

Permalink
ignore all-whitespace Exif comments
Browse files Browse the repository at this point in the history
  • Loading branch information
qbnu committed Jun 21, 2023
1 parent 6fab641 commit 2ce3887
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/JPEGView/EXIFDisplayCtl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void CEXIFDisplayCtl::FillEXIFDataDisplay() {
CRawMetadata* pRawMetaData = CurrentImage()->GetRawMetadata();
if (pEXIFReader != NULL) {
sComment = pEXIFReader->GetUserComment();
if (sComment == NULL || sComment[0] == 0) {
if (sComment == NULL || sComment[0] == 0 || ((std::wstring) sComment).find_first_not_of(L" \t\n\r\f\v", 0) == std::wstring::npos) {
sComment = pEXIFReader->GetImageDescription();
}
if (pEXIFReader->GetAcquisitionTimePresent()) {
Expand Down Expand Up @@ -201,7 +201,7 @@ void CEXIFDisplayCtl::FillEXIFDataDisplay() {
}
}

if (sComment == NULL || sComment[0] == 0) {
if (sComment == NULL || sComment[0] == 0 || ((std::wstring)sComment).find_first_not_of(L" \t\n\r\f\v", 0) == std::wstring::npos) {
sComment = CurrentImage()->GetJPEGComment();
}
if (CSettingsProvider::This().ShowJPEGComments() && sComment != NULL && sComment[0] != 0) {
Expand Down

0 comments on commit 2ce3887

Please sign in to comment.