Use unused variable instead of hard-coded values in DateValue::copy

v0.27.3
Luis Diaz Mas 7 years ago committed by Luis Díaz Más
parent bf0b7affaa
commit a246c73d6f

@ -977,11 +977,10 @@ namespace Exiv2 {
// sprintf wants to add the null terminator, so use oversized buffer
char temp[9];
int wrote = sprintf(temp, "%04d%02d%02d",
date_.year, date_.month, date_.day);
int wrote = sprintf(temp, "%04d%02d%02d", date_.year, date_.month, date_.day);
assert(wrote == 8);
std::memcpy(buf, temp, 8);
return 8;
std::memcpy(buf, temp, wrote);
return wrote;
}
const DateValue::Date& DateValue::getDate() const

Loading…
Cancel
Save