Alexandre Julliard : winebuild: Fixed index in module table for delayed imports.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Apr 18 05:13:48 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 02a9bc00948f5449e425aa136867efa98e60a048
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=02a9bc00948f5449e425aa136867efa98e60a048

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Apr 18 11:23:49 2006 +0200

winebuild: Fixed index in module table for delayed imports.

---

 tools/winebuild/import.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c
index 43956e8..7eafe47 100644
--- a/tools/winebuild/import.c
+++ b/tools/winebuild/import.c
@@ -793,7 +793,7 @@ static void output_immediate_import_thun
 /* output the delayed import table of a Win32 module */
 static void output_delayed_imports( FILE *outfile, const DLLSPEC *spec )
 {
-    int i, j;
+    int i, j, mod;
 
     if (!nb_delayed) return;
 
@@ -804,14 +804,14 @@ static void output_delayed_imports( FILE
 
     /* list of dlls */
 
-    for (i = j = 0; i < nb_imports; i++)
+    for (i = j = mod = 0; i < nb_imports; i++)
     {
         if (!dll_imports[i]->delay) continue;
         fprintf( outfile, "\t%s 0\n", get_asm_ptr_keyword() );   /* grAttrs */
         fprintf( outfile, "\t%s .L__wine_delay_name_%d\n",       /* szName */
                  get_asm_ptr_keyword(), i );
         fprintf( outfile, "\t%s .L__wine_delay_modules+%d\n",    /* phmod */
-                 get_asm_ptr_keyword(), i * get_ptr_size() );
+                 get_asm_ptr_keyword(), mod * get_ptr_size() );
         fprintf( outfile, "\t%s .L__wine_delay_IAT+%d\n",        /* pIAT */
                  get_asm_ptr_keyword(), j * get_ptr_size() );
         fprintf( outfile, "\t%s .L__wine_delay_INT+%d\n",        /* pINT */
@@ -820,6 +820,7 @@ static void output_delayed_imports( FILE
         fprintf( outfile, "\t%s 0\n", get_asm_ptr_keyword() );   /* pUnloadIAT */
         fprintf( outfile, "\t%s 0\n", get_asm_ptr_keyword() );   /* dwTimeStamp */
         j += dll_imports[i]->nb_imports;
+        mod++;
     }
     fprintf( outfile, "\t%s 0\n", get_asm_ptr_keyword() );   /* grAttrs */
     fprintf( outfile, "\t%s 0\n", get_asm_ptr_keyword() );   /* szName */




More information about the wine-cvs mailing list