From: Alex Henrie alexhenrie24@gmail.com
If it's not static, the string goes out of scope and is overwritten with other stack data.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54387 --- dlls/winspool.drv/info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c index c1c3b8bf629..9461f62dcbe 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -661,7 +661,7 @@ static BOOL add_printer_driver( const WCHAR *name, const WCHAR *ppd_dir ) di3.pEnvironment = (WCHAR *)all_printenv[i]->envname; if (all_printenv[i]->driverversion == 0) { - WCHAR driver_9x[] = L"wineps16.drv"; + static WCHAR driver_9x[] = L"wineps16.drv"; /* We use wineps16.drv as driver for 16 bit */ di3.pDriverPath = driver_9x; di3.pConfigFile = driver_9x;