Bug#101751: heroes of might and magic does not run (fix)

Ove Kaaven ovek at arcticnet.no
Tue Jul 3 05:31:33 CDT 2001


Forwarding patch from Richard Eckart <bluefire at zauberwald.net>:

On Thu, 21 Jun 2001, Richard Eckart wrote:

> Package: wine
> Version: 0.0.20010510-3
> Severity: normal
> Tags: sid
> 
> I found that HOMM3 did not run under wine. This is
> because HOMM3 expectes a '\' at the end of a path
> returned by GetFullPathNameA in dos_fs.c. 
> After I patched to function so that it makes sure that
> there is an '\' at the end of the path (if there is enought
> room in the string), the game worked fine.

On Tue, 3 Jul 2001, Richard Eckart wrote:

> OK... so here's the patch. I hope it won't get
> corrupted or someting. There should really be
> an attachment option for reportbug... maybe
> that's something for the reportbug wishlist.
> 
> Please tell me wether this patch came through
> right.
> 
> Richard
> 

*** wine-homm-patch
Only in files/: Makefile
Only in files/: change.o
Only in files/: directory.o
diff -u files.orig/dos_fs.c files/dos_fs.c
--- files.orig/dos_fs.c	Fri Apr 20 20:38:41 2001
+++ files/dos_fs.c	Thu Jun  7 09:28:20 2001
@@ -1353,6 +1353,18 @@
           *lastpart = p + 1;
 	}
 	else *lastpart = NULL;
+	
+	// BLUEFIRE START: fix HOMM3
+	p = buffer + strlen(buffer);
+	if( *p != '\\' && (ret < len))
+	{
+	    // check if path terminates with \ else
+	    // add it and increase length by 1
+	    *p = '\\';
+	    p ++;
+	    *p = 0;
+	}
+	// BLUEFIRE END: fix HOMM3
     }
     return ret;
 }
Only in files/: dos_fs.o
Only in files/: drive.o
Only in files/: file.o
Only in files/: files.o
Only in files/: profile.o
Only in files/: tape.o





More information about the wine-patches mailing list