winevdm: Abstract references to /dosbox.

Signed-off-by: Gerald Pfeifer <gerald@pfeifer.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Gerald Pfeifer 2020-10-02 16:52:41 +03:00 committed by Alexandre Julliard
parent 2278485d02
commit 689ff9c073
1 changed files with 3 additions and 2 deletions

View File

@ -35,6 +35,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(winevdm);
#define DOSBOX "dosbox"
/*** PIF file structures ***/
#include "pshpack1.h"
@ -118,7 +119,7 @@ static char *find_dosbox(void)
envpath_len = strlen( envpath );
path = HeapAlloc( GetProcessHeap(), 0, envpath_len + 1 );
buffer = HeapAlloc( GetProcessHeap(), 0, envpath_len + sizeof("/dosbox") );
buffer = HeapAlloc( GetProcessHeap(), 0, envpath_len + strlen(DOSBOX) + 2 );
strcpy( path, envpath );
p = path;
@ -130,7 +131,7 @@ static char *find_dosbox(void)
while (*p && *p != ':') p++;
if (*p == ':') *p++ = 0;
strcpy( buffer, dir );
strcat( buffer, "/dosbox" );
strcat( buffer, "/" DOSBOX );
if (!stat( buffer, &st ))
{
HeapFree( GetProcessHeap(), 0, path );