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
94b9b614
Commit
94b9b614
authored
Apr 02, 2007
by
Jason Edmeades
Committed by
Alexandre Julliard
Apr 03, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Convert to VT_DECIMAL fails with overflow (with test).
parent
c76d5561
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
vartest.c
dlls/oleaut32/tests/vartest.c
+7
-0
variant.c
dlls/oleaut32/variant.c
+1
-1
No files found.
dlls/oleaut32/tests/vartest.c
View file @
94b9b614
...
...
@@ -1391,6 +1391,11 @@ static const char *szFailOk = "Call failed, hres = %08x\n";
#define EXPECT_CY(val) EXPECT_OK { EXPECT_TYPE(VT_CY); \
ok(V_CY(&vOut).int64 == (LONG64)(val * CY_MULTIPLIER), "Expected r8 = 0x%x%08x, got 0x%x%08x\n", \
(DWORD)((LONG64)val >> 23), (DWORD)(LONG64)val, (DWORD)(V_CY(&vOut).int64 >>32), (DWORD)V_CY(&vOut).int64); }
#define EXPECT_DECIMAL(valHi, valMid, valLo) EXPECT_OK { EXPECT_TYPE(VT_DECIMAL); \
ok((V_DECIMAL(&vOut).Hi32 == valHi) && (V_DECIMAL(&vOut).Mid32 == valMid) && \
(V_DECIMAL(&vOut).Lo32 == valLo), \
"Expected decimal = %x/0x%x%08x, got %x/0x%x%08x\n", valHi, valMid, valLo, \
V_DECIMAL(&vOut).Hi32, V_DECIMAL(&vOut).Mid32, V_DECIMAL(&vOut).Lo32); }
static
void
test_VarNumFromParseNum
(
void
)
{
...
...
@@ -1454,6 +1459,8 @@ static void test_VarNumFromParseNum(void)
/* 0x7f */
SETRGB
(
0
,
7
);
SETRGB
(
1
,
0xf
);
CONVERT
(
2
,
0
,
0
,
2
,
4
,
0
,
INTEGER_VTBITS
);
EXPECT_I1
(
0x7f
);
SETRGB
(
0
,
7
);
SETRGB
(
1
,
0xf
);
CONVERT
(
2
,
0
,
0
,
2
,
4
,
0
,
VTBIT_DECIMAL
);
EXPECT_DECIMAL
(
0
,
0
,
0x7f
);
/* 0x7fff */
SETRGB
(
0
,
7
);
SETRGB
(
1
,
0xf
);
SETRGB
(
2
,
0xf
);
SETRGB
(
3
,
0xf
);
CONVERT
(
4
,
0
,
0
,
4
,
4
,
0
,
INTEGER_VTBITS
);
EXPECT_I2
(
0x7fff
);
...
...
dlls/oleaut32/variant.c
View file @
94b9b614
...
...
@@ -2019,7 +2019,7 @@ HRESULT WINAPI VarNumFromParseNum(NUMPARSE *pNumprs, BYTE *rgbDig,
V_UI8
(
pVarDst
)
=
ul64
;
return
S_OK
;
}
else
if
((
dwVtBits
&
REAL_VTBITS
)
==
VTBIT_DECIMAL
)
else
if
((
dwVtBits
&
VTBIT_DECIMAL
)
==
VTBIT_DECIMAL
)
{
V_VT
(
pVarDst
)
=
VT_DECIMAL
;
DEC_SIGNSCALE
(
&
V_DECIMAL
(
pVarDst
))
=
SIGNSCALE
(
DECIMAL_POS
,
0
);
...
...
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