diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-16 20:11:06 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-16 20:11:06 +0000 |
commit | 49ca701d8284678304f3b7b10c877f66a5494b35 (patch) | |
tree | 307fecb4278aba70c7e9f43632bd54ac13afec3f /base/clipboard_util.cc | |
parent | dde6e35f3f0ecda0f8c7c5873ef04eb4877ee9f2 (diff) | |
download | chromium_src-49ca701d8284678304f3b7b10c877f66a5494b35.zip chromium_src-49ca701d8284678304f3b7b10c877f66a5494b35.tar.gz chromium_src-49ca701d8284678304f3b7b10c877f66a5494b35.tar.bz2 |
Take 2 at fixing image corruption on drag and drop.
Fix a unittest that needs to specify the size when reading
char* data.
Review URL: http://codereview.chromium.org/7441
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3478 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/clipboard_util.cc')
-rw-r--r-- | base/clipboard_util.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/base/clipboard_util.cc b/base/clipboard_util.cc index 5902b43..9d35db4 100644 --- a/base/clipboard_util.cc +++ b/base/clipboard_util.cc @@ -356,8 +356,7 @@ bool ClipboardUtil::GetFileContents(IDataObject* data_object, if (SUCCEEDED(data_object->GetData(GetFileContentFormatZero(), &content))) { if (TYMED_HGLOBAL == content.tymed) { ScopedHGlobal<char> data(content.hGlobal); - // The size includes the trailing NULL byte. We don't want it. - file_contents->assign(data.get(), data.Size() - 1); + file_contents->assign(data.get(), data.Size()); } ReleaseStgMedium(&content); } |