dlls/fusion/assembly.c -- no-op error checks

Gerald Pfeifer gerald at pfeifer.com
Wed Apr 16 12:47:30 CDT 2008


On Wed, 16 Apr 2008, James Hawkins wrote:
> The offsets are explicity set to -1 on line 242, so the check needs to
> be for -1.  It won't work at all otherwise.

Thanks, James!  I was looking for this, but must have missed it somehow.  
I'm glad I Cc:d you. :-)

Please find the real fix below.

Gerald

ChangeLog: 
Fix error checks in assembly_get_name() and assembly_get_pubkey_token().

Index: dlls/fusion/assembly.c
===================================================================
RCS file: /home/wine/wine/dlls/fusion/assembly.c,v
retrieving revision 1.2
diff -u -3 -p -r1.2 assembly.c
--- dlls/fusion/assembly.c	16 Apr 2008 13:11:12 -0000	1.2
+++ dlls/fusion/assembly.c	16 Apr 2008 17:45:26 -0000
@@ -416,7 +416,7 @@ HRESULT assembly_get_name(ASSEMBLY *asse
     ULONG offset;
 
     offset = assembly->tables[0x20].offset; /* FIXME: add constants */
-    if (offset < 0)
+    if (offset == -1)
         return E_FAIL;
 
     asmtbl = (ASSEMBLYTABLE *)assembly_data_offset(assembly, offset);
@@ -527,7 +527,7 @@ HRESULT assembly_get_pubkey_token(ASSEMB
     *token = NULL;
 
     offset = assembly->tables[0x20].offset; /* FIXME: add constants */
-    if (offset < 0)
+    if (offset == -1)
         return E_FAIL;
 
     asmtbl = (ASSEMBLYTABLE *)assembly_data_offset(assembly, offset);



More information about the wine-patches mailing list