winegcc: Fix returned libdir

André Hentschel nerv at dawncrow.de
Wed Oct 27 12:37:25 CDT 2010


with /libwine.so it is not a valid directory
and the slash is added later anyway
---
 tools/winegcc/winegcc.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index 8dfa14a..5ea044f 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -364,12 +364,20 @@ static char *get_lib_dir( struct options *opts )
         if (opts->force_pointer_size == 4 || (!opts->force_pointer_size && opts->target_cpu != CPU_x86_64))
         {
             strcpy( p, "32/libwine.so" );
-            if (check_platform( opts, buffer )) return buffer;
+            if (check_platform( opts, buffer ))
+            {
+                p[2] = 0;
+                return buffer;
+            }
         }
         if (opts->force_pointer_size == 8 || (!opts->force_pointer_size && opts->target_cpu == CPU_x86_64))
         {
             strcpy( p, "64/libwine.so" );
-            if (check_platform( opts, buffer )) return buffer;
+            if (check_platform( opts, buffer ))
+            {
+                p[2] = 0;
+                return buffer;
+            }
         }
         free( buffer );
     }
-- 

Best Regards, André Hentschel



More information about the wine-patches mailing list