Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
9611986a
Commit
9611986a
authored
Aug 14, 2002
by
Mike McCormack
Committed by
Alexandre Julliard
Aug 14, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct the size of the colour map allocated in the bitmap header for
the case biClrUsed = 0.
parent
704bf5ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
drawdib.c
dlls/msvideo/drawdib.c
+11
-2
No files found.
dlls/msvideo/drawdib.c
View file @
9611986a
...
...
@@ -50,6 +50,15 @@ typedef struct {
LPVOID
lpvbits
;
/* Buffer for holding decompressed dib */
}
WINE_HDD
;
int
num_colours
(
LPBITMAPINFOHEADER
lpbi
)
{
if
(
lpbi
->
biClrUsed
)
return
lpbi
->
biClrUsed
;
if
(
lpbi
->
biBitCount
<=
8
)
return
1
<<
lpbi
->
biBitCount
;
return
0
;
}
/***********************************************************************
* DrawDibOpen [MSVFW32.@]
*/
...
...
@@ -215,7 +224,7 @@ BOOL VFWAPI DrawDibBegin(HDRAWDIB hdd,
DWORD
dwSize
;
/* No compression */
TRACE
(
"Not compressed!
\n
"
);
dwSize
=
lpbi
->
biSize
+
lpbi
->
biClrUsed
*
sizeof
(
RGBQUAD
);
dwSize
=
lpbi
->
biSize
+
num_colours
(
lpbi
)
*
sizeof
(
RGBQUAD
);
whdd
->
lpbiOut
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwSize
);
memcpy
(
whdd
->
lpbiOut
,
lpbi
,
dwSize
);
}
...
...
@@ -294,7 +303,7 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc,
if
(
!
lpBits
)
{
/* Undocumented? */
lpBits
=
(
LPSTR
)
lpbi
+
(
WORD
)(
lpbi
->
biSize
)
+
(
WORD
)(
lpbi
->
biClrUsed
*
sizeof
(
RGBQUAD
));
lpBits
=
(
LPSTR
)
lpbi
+
(
WORD
)(
lpbi
->
biSize
)
+
(
WORD
)(
num_colours
(
lpbi
)
*
sizeof
(
RGBQUAD
));
}
whdd
=
GlobalLock16
(
hdd
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment