summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--source/XMPCore/XMPUtils.cpp4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index b757764..5cc4394 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-12-20 Hubert Figuiere <hub@figuiere.net>
+
+ * source/XMPCore/XMPUtils.cpp (ConvertFromInt64): Fix format
+ for long long int that was causing a failure on ppc (big endian).
+
2007-12-19 Hubert Figuiere <hub@figuiere.net>
* exempi/exempi.cpp, exempi/tests/test1.cpp,
diff --git a/source/XMPCore/XMPUtils.cpp b/source/XMPCore/XMPUtils.cpp
index 0dacc0c..69f92c4 100644
--- a/source/XMPCore/XMPUtils.cpp
+++ b/source/XMPCore/XMPUtils.cpp
@@ -915,7 +915,7 @@ XMPUtils::ConvertFromInt ( XMP_Int32 binValue,
{
XMP_Assert ( (format != 0) && (strValue != 0) && (strSize != 0) ); // Enforced by wrapper.
- if ( *format == 0 ) format = "%d";
+ if ( *format == 0 ) format = "%d"; // format for int, which is 32bits on most arch including x86_64
sConvertedValue->erase();
sConvertedValue->reserve ( 100 ); // More than enough for any reasonable format and value.
@@ -944,7 +944,7 @@ XMPUtils::ConvertFromInt64 ( XMP_Int64 binValue,
{
XMP_Assert ( (format != 0) && (strValue != 0) && (strSize != 0) ); // Enforced by wrapper.
- if ( *format == 0 ) format = "%d";
+ if ( *format == 0 ) format = "%lld"; // format for long long int which should be ok for most arch.
sConvertedValue->erase();
sConvertedValue->reserve ( 100 ); // More than enough for any reasonable format and value.