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
6cc7b0e8
Commit
6cc7b0e8
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: Return correct error when builtin call argument count is invalid.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
17fb70ef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
2 deletions
+24
-2
api.vbs
dlls/vbscript/tests/api.vbs
+22
-0
vbdisp.c
dlls/vbscript/vbdisp.c
+2
-2
No files found.
dlls/vbscript/tests/api.vbs
View file @
6cc7b0e8
...
...
@@ -237,6 +237,17 @@ Call ok(UBound(arr2) = 2, "UBound(x) = " & UBound(x))
Call
ok
(
UBound
(
arr2
,
1
)
=
2
,
"UBound(x) = "
&
UBound
(
x
))
Call
ok
(
UBound
(
arr2
,
2
)
=
4
,
"UBound(x) = "
&
UBound
(
x
))
sub
testUBoundError
()
on
error
resume
next
call
Err
.
clear
()
call
UBound
()
call
ok
(
Err
.
number
=
450
,
"Err.number = "
&
Err
.
number
)
call
Err
.
clear
()
call
UBound
(
arr
,
1
,
2
)
call
ok
(
Err
.
number
=
450
,
"Err.number = "
&
Err
.
number
)
end
sub
call
testUBoundError
()
Dim
newObject
Set
newObject
=
New
ValClass
newObject
.
myval
=
1
...
...
@@ -494,6 +505,17 @@ TestStrComp "ABC", Empty, 1, 1
TestStrComp
vbNull
,
vbNull
,
1
,
0
TestStrComp
""
,
vbNull
,
1
,
-
1
sub
testStrCompError
()
on
error
resume
next
call
Err
.
clear
()
call
StrComp
()
call
ok
(
Err
.
number
=
450
,
"Err.number = "
&
Err
.
number
)
call
Err
.
clear
()
call
StrComp
(
"a"
,
"a"
,
0
,
1
)
call
ok
(
Err
.
number
=
450
,
"Err.number = "
&
Err
.
number
)
end
sub
call
testStrCompError
()
Call
ok
(
Len
(
"abc"
)
=
3
,
"Len(abc) = "
&
Len
(
"abc"
))
Call
ok
(
Len
(
""
)
=
0
,
"Len() = "
&
Len
(
""
))
Call
ok
(
Len
(
1
)
=
1
,
"Len(1) = "
&
Len
(
1
))
...
...
dlls/vbscript/vbdisp.c
View file @
6cc7b0e8
...
...
@@ -232,8 +232,8 @@ static HRESULT invoke_builtin(vbdisp_t *This, const builtin_prop_t *prop, WORD f
argn
=
arg_cnt
(
dp
);
if
(
argn
<
prop
->
min_args
||
argn
>
(
prop
->
max_args
?
prop
->
max_args
:
prop
->
min_args
))
{
FIXME
(
"invalid number of arguments
\n
"
);
return
E_FAIL
;
WARN
(
"invalid number of arguments
\n
"
);
return
MAKE_VBSERROR
(
VBSE_FUNC_ARITY_MISMATCH
)
;
}
assert
(
argn
<
ARRAY_SIZE
(
args
));
...
...
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