[Wine-patches] [eterhack] ole32: Always create new header (eterbug #6749).

Alexander Morozov amorozov на etersoft.ru
Ср Янв 26 20:48:33 MSK 2011


----------- следующая часть -----------
From 1c6d8d4cb6d70c962a4e4e2e4feb0bfc29ac2ccf Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Wed, 26 Jan 2011 20:39:47 +0300
Subject: [eterhack] ole32: Always create new header (eterbug #6749).

---
 dlls/ole32/storage32.c |   18 ++++++------------
 1 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
index 836b2fd..8c0f8d0 100644
--- a/dlls/ole32/storage32.c
+++ b/dlls/ole32/storage32.c
@@ -3640,20 +3640,14 @@ static void StorageImpl_SaveFileHeader(
   }
 
   /*
-   * If the block read failed, the file is probably new.
+   * Initialize for all unknown fields.
    */
-  if (FAILED(hr))
-  {
-    /*
-     * Initialize for all unknown fields.
-     */
-    memset(headerBigBlock, 0, HEADER_SIZE);
+  memset(headerBigBlock, 0, HEADER_SIZE);
 
-    /*
-     * Initialize the magic number.
-     */
-    memcpy(headerBigBlock, STORAGE_magic, sizeof(STORAGE_magic));
-  }
+  /*
+   * Initialize the magic number.
+   */
+  memcpy(headerBigBlock, STORAGE_magic, sizeof(STORAGE_magic));
 
   /*
    * Write the information to the header.
-- 
1.7.3.4



Подробная информация о списке рассылки Wine-patches