Removed void AsciiValue::read(const byte*, long, ByteOrder); instead use that of the baseclass, which does not add a trailing null.
Adding a null can cause a metacopy operation to write from metadata instead of simply copying the metadata.
This commit is contained in:
parent
5042708cf2
commit
b8a7b77ade
@ -224,13 +224,6 @@ namespace Exiv2 {
|
||||
return *this;
|
||||
}
|
||||
|
||||
void AsciiValue::read(const byte* buf, long len, ByteOrder byteOrder)
|
||||
{
|
||||
// byteOrder not needed
|
||||
value_ = std::string(reinterpret_cast<const char*>(buf), len);
|
||||
if (value_[value_.size()-1] != '\0') value_ += '\0';
|
||||
}
|
||||
|
||||
void AsciiValue::read(const std::string& buf)
|
||||
{
|
||||
value_ = buf;
|
||||
|
||||
@ -467,20 +467,6 @@ namespace Exiv2 {
|
||||
//@{
|
||||
//! Assignment operator
|
||||
AsciiValue& operator=(const AsciiValue& rhs);
|
||||
/*!
|
||||
@brief Read the value from a character buffer. Appends a terminating
|
||||
'\\0' character if buf doesn't end with 0.
|
||||
|
||||
@note The byte order is required by the interface but not used by this
|
||||
method, so just use the default.
|
||||
|
||||
@param buf Pointer to the data buffer to read from
|
||||
@param len Number of bytes in the data buffer
|
||||
@param byteOrder Byte order. Not needed.
|
||||
*/
|
||||
virtual void read(const byte* buf,
|
||||
long len,
|
||||
ByteOrder byteOrder =invalidByteOrder);
|
||||
/*!
|
||||
@brief Set the value to that of the string buf. Overrides base class
|
||||
to append a terminating '\\0' character if buf doesn't end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user