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
fb5b0c64
Commit
fb5b0c64
authored
Aug 21, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Fix handling null argument in CStr.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c9a606fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
global.c
dlls/vbscript/global.c
+3
-0
api.vbs
dlls/vbscript/tests/api.vbs
+8
-0
No files found.
dlls/vbscript/global.c
View file @
fb5b0c64
...
...
@@ -528,6 +528,9 @@ static HRESULT Global_CStr(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARI
TRACE
(
"%s
\n
"
,
debugstr_variant
(
arg
));
if
(
V_VT
(
arg
)
==
VT_NULL
)
return
MAKE_VBSERROR
(
VBSE_ILLEGAL_NULL_USE
);
hres
=
to_string
(
arg
,
&
str
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/vbscript/tests/api.vbs
View file @
fb5b0c64
...
...
@@ -129,6 +129,14 @@ TestCStr 3, "3"
if
isEnglishLang
then
TestCStr
3.5
,
"3.5"
if
isEnglishLang
then
TestCStr
true
,
"True"
sub
testCStrError
()
on
error
resume
next
Error
.
clear
()
CStr
(
null
)
call
ok
(
Err
.
number
=
94
,
"Err.number = "
&
Err
.
number
)
end
sub
call
testCStrError
()
Call
ok
(
getVT
(
Chr
(
120
))
=
"VT_BSTR"
,
"getVT(Chr(120)) = "
&
getVT
(
Chr
(
120
)))
Call
ok
(
getVT
(
Chr
(
255
))
=
"VT_BSTR"
,
"getVT(Chr(255)) = "
&
getVT
(
Chr
(
255
)))
Call
ok
(
Chr
(
120
)
=
"x"
,
"Chr(120) = "
&
Chr
(
120
))
...
...
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