changeset 699:3b00c1650490

Fix incorrect length calculation in creating CFURL from non-ASCII file path
author Chris Cannam
date Wed, 17 Aug 2011 22:12:13 +0100
parents 682101331278
children 5117d7cf59ec
files data/fileio/QuickTimeFileReader.cpp
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/data/fileio/QuickTimeFileReader.cpp	Sun Jun 26 19:33:54 2011 +0100
+++ b/data/fileio/QuickTimeFileReader.cpp	Wed Aug 17 22:12:13 2011 +0100
@@ -89,10 +89,12 @@
  //       (0, m_path.toLocal8Bit().data(), 0);
 
 
+    QByteArray ba = m_path.toLocal8Bit();
+
     CFURLRef url = CFURLCreateFromFileSystemRepresentation
         (kCFAllocatorDefault,
-         (const UInt8 *)m_path.toLocal8Bit().data(),
-         (CFIndex)m_path.length(),
+         (const UInt8 *)ba.data(),
+         (CFIndex)ba.length(),
          false);