diff --git a/dlls/krnl386.exe16/file.c b/dlls/krnl386.exe16/file.c index 6c3cef3534a..77908c2a6c4 100644 --- a/dlls/krnl386.exe16/file.c +++ b/dlls/krnl386.exe16/file.c @@ -461,10 +461,10 @@ LONG WINAPI _hwrite16( HFILE16 hFile, LPCSTR buffer, LONG count ) */ UINT WINAPI GetTempDrive( BYTE ignored ) { - WCHAR buffer[8]; + WCHAR buffer[MAX_PATH]; BYTE ret; - if (GetTempPathW( 8, buffer )) ret = (BYTE)toupperW(buffer[0]); + if (GetTempPathW( MAX_PATH, buffer )) ret = (BYTE)toupperW(buffer[0]); else ret = 'C'; return MAKELONG( ret | (':' << 8), 1 ); }