Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treat forward slash as a pathspec and truncate biheight in wing to an… #1138

Merged
merged 2 commits into from
Mar 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion krnl386/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,7 @@ static void RedirectPrivateProfileStringWindowsDir(LPCSTR filename, LPCSTR outpu
{
if (!filename)
filename = "win.ini";
if (PathIsFileSpecA(filename))
if (PathIsFileSpecA(filename) && !strchr(filename, '/'))
{
PathCombineA(output, GetRedirectWindowsDir(), filename);
}
Expand Down
8 changes: 8 additions & 0 deletions wing/wing.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,12 @@ HBITMAP16 WINAPI WinGCreateBitmap16(HDC16 hdc, BITMAPINFO *bmpi, SEGPTR *bits)
{
LPVOID bits32;
HBITMAP hbitmap;
LONG oldheight = bmpi->bmiHeader.biHeight;
DWORD oldsize = bmpi->bmiHeader.biSizeImage;
bmpi->bmiHeader.biSizeImage = 0;

if (oldheight >= 32768)
bmpi->bmiHeader.biHeight = (INT16)(oldheight & 0xffff);

TRACE("(%d,%p,%p): create %dx%dx%d bitmap\n", hdc, bmpi, bits,
bmpi->bmiHeader.biWidth, bmpi->bmiHeader.biHeight, bmpi->bmiHeader.biPlanes);
Expand All @@ -186,6 +192,8 @@ HBITMAP16 WINAPI WinGCreateBitmap16(HDC16 hdc, BITMAPINFO *bmpi, SEGPTR *bits)
SEGPTR segptr = alloc_segptr_bits( hbitmap, bits32, (bmpi->bmiHeader.biHeight < 0) );
if (bits) *bits = segptr;
}
bmpi->bmiHeader.biHeight = oldheight;
bmpi->bmiHeader.biSizeImage = oldsize;
return HBITMAP_16(hbitmap);
}

Expand Down