Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
7c1f6656
Commit
7c1f6656
authored
Oct 20, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus/tests: Add an intermediate variable to avoid array bounds warnings.
parent
328328bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
image.c
dlls/gdiplus/tests/image.c
+10
-9
No files found.
dlls/gdiplus/tests/image.c
View file @
7c1f6656
...
...
@@ -1776,6 +1776,7 @@ static void test_palette(void)
INT
size
;
BYTE
buffer
[
1040
];
ColorPalette
*
palette
=
(
ColorPalette
*
)
buffer
;
ARGB
*
entries
=
palette
->
Entries
;
ARGB
color
=
0
;
/* test initial palette from non-indexed bitmap */
...
...
@@ -1819,8 +1820,8 @@ static void test_palette(void)
expect
(
PaletteFlagsGrayScale
,
palette
->
Flags
);
expect
(
2
,
palette
->
Count
);
expect
(
0xff000000
,
palette
->
E
ntries
[
0
]);
expect
(
0xffffffff
,
palette
->
E
ntries
[
1
]);
expect
(
0xff000000
,
e
ntries
[
0
]);
expect
(
0xffffffff
,
e
ntries
[
1
]);
/* test getting/setting pixels */
stat
=
GdipBitmapGetPixel
(
bitmap
,
0
,
0
,
&
color
);
...
...
@@ -1905,12 +1906,12 @@ static void test_palette(void)
}
/* test setting/getting a different palette */
palette
->
E
ntries
[
1
]
=
0xffcccccc
;
e
ntries
[
1
]
=
0xffcccccc
;
stat
=
GdipSetImagePalette
((
GpImage
*
)
bitmap
,
palette
);
expect
(
Ok
,
stat
);
palette
->
E
ntries
[
1
]
=
0
;
e
ntries
[
1
]
=
0
;
stat
=
GdipGetImagePaletteSize
((
GpImage
*
)
bitmap
,
&
size
);
expect
(
Ok
,
stat
);
...
...
@@ -1920,7 +1921,7 @@ static void test_palette(void)
expect
(
Ok
,
stat
);
expect
(
PaletteFlagsHalftone
,
palette
->
Flags
);
expect
(
256
,
palette
->
Count
);
expect
(
0xffcccccc
,
palette
->
E
ntries
[
1
]);
expect
(
0xffcccccc
,
e
ntries
[
1
]);
/* test count < 256 */
palette
->
Flags
=
12345
;
...
...
@@ -1929,8 +1930,8 @@ static void test_palette(void)
stat
=
GdipSetImagePalette
((
GpImage
*
)
bitmap
,
palette
);
expect
(
Ok
,
stat
);
palette
->
E
ntries
[
1
]
=
0
;
palette
->
E
ntries
[
3
]
=
0xdeadbeef
;
e
ntries
[
1
]
=
0
;
e
ntries
[
3
]
=
0xdeadbeef
;
stat
=
GdipGetImagePaletteSize
((
GpImage
*
)
bitmap
,
&
size
);
expect
(
Ok
,
stat
);
...
...
@@ -1940,8 +1941,8 @@ static void test_palette(void)
expect
(
Ok
,
stat
);
expect
(
12345
,
palette
->
Flags
);
expect
(
3
,
palette
->
Count
);
expect
(
0xffcccccc
,
palette
->
E
ntries
[
1
]);
expect
(
0xdeadbeef
,
palette
->
E
ntries
[
3
]);
expect
(
0xffcccccc
,
e
ntries
[
1
]);
expect
(
0xdeadbeef
,
e
ntries
[
3
]);
/* test count > 256 */
palette
->
Count
=
257
;
...
...
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