Fixed bugs found on MinGW and with MSVC. iotest still misteriously fails.

v0.27.3
Andreas Huggel 21 years ago
parent 3fe885dcf8
commit 90a707fa2e

@ -229,6 +229,21 @@
<File <File
RelativePath="..\..\src\nikonmn.cpp"> RelativePath="..\..\src\nikonmn.cpp">
</File> </File>
<File
RelativePath="..\..\src\olympusmn.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
</FileConfiguration>
</File>
<File <File
RelativePath="..\..\src\sigmamn.cpp"> RelativePath="..\..\src\sigmamn.cpp">
<FileConfiguration <FileConfiguration
@ -336,6 +351,9 @@
<File <File
RelativePath="..\..\src\nikonmn.hpp"> RelativePath="..\..\src\nikonmn.hpp">
</File> </File>
<File
RelativePath="..\..\src\olympusmn.hpp">
</File>
<File <File
RelativePath="..\..\src\rcsid.hpp"> RelativePath="..\..\src\rcsid.hpp">
</File> </File>

@ -33,6 +33,12 @@ EXIV2_RCSID("@(#) $Id$");
// ***************************************************************************** // *****************************************************************************
// included header files // included header files
#ifdef _MSC_VER
# include "exv_msvc.h"
#else
# include "exv_conf.h"
#endif
#include "basicio.hpp" #include "basicio.hpp"
#include "types.hpp" #include "types.hpp"

@ -44,6 +44,7 @@ EXIV2_RCSID("@(#) $Id$");
#include <string> #include <string>
#include <sstream> #include <sstream>
#include <iomanip> #include <iomanip>
#include <algorithm>
#include <cassert> #include <cassert>
#include <cstring> #include <cstring>
@ -346,12 +347,12 @@ namespace Exiv2 {
{ {
DataBuf buf(1024); DataBuf buf(1024);
memset(buf.pData_, 0x0, 1024); memset(buf.pData_, 0x0, 1024);
long len = 0; uint16_t len = 0;
Entries::const_iterator end = entries_.end(); Entries::const_iterator end = entries_.end();
for (Entries::const_iterator i = entries_.begin(); i != end; ++i) { for (Entries::const_iterator i = entries_.begin(); i != end; ++i) {
if (i->ifdId() == ifdId) { if (i->ifdId() == ifdId) {
long pos = i->tag() * 2; uint16_t pos = i->tag() * 2;
long size = pos + i->size(); uint16_t size = pos + static_cast<uint16_t>(i->size());
assert(size <= 1024); assert(size <= 1024);
memcpy(buf.pData_ + pos, i->data(), i->size()); memcpy(buf.pData_ + pos, i->data(), i->size());
if (len < size) len = size; if (len < size) len = size;

@ -35,6 +35,12 @@ EXIV2_RCSID("@(#) $Id$");
// ***************************************************************************** // *****************************************************************************
// included header files // included header files
#ifdef _MSC_VER
# include "exv_msvc.h"
#else
# include "exv_conf.h"
#endif
#include "exif.hpp" #include "exif.hpp"
#include "types.hpp" #include "types.hpp"
#include "basicio.hpp" #include "basicio.hpp"

@ -186,7 +186,7 @@ namespace Exiv2 {
OlympusMakerNote::AutoPtr OlympusMakerNote::clone() const OlympusMakerNote::AutoPtr OlympusMakerNote::clone() const
{ {
return AutoPtr(clone()); return AutoPtr(clone_());
} }
OlympusMakerNote* OlympusMakerNote::clone_() const OlympusMakerNote* OlympusMakerNote::clone_() const

Loading…
Cancel
Save