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
85b98992
Commit
85b98992
authored
Sep 22, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 22, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Don't try to convert int to short in return_int.
parent
d684d776
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
24 deletions
+7
-24
global.c
dlls/vbscript/global.c
+4
-24
api.vbs
dlls/vbscript/tests/api.vbs
+2
-0
error.vbs
dlls/vbscript/tests/error.vbs
+1
-0
No files found.
dlls/vbscript/global.c
View file @
85b98992
...
...
@@ -112,9 +112,6 @@ static HRESULT return_short(VARIANT *res, short val)
static
HRESULT
return_int
(
VARIANT
*
res
,
int
val
)
{
if
((
short
)
val
==
val
)
return
return_short
(
res
,
val
);
if
(
res
)
{
V_VT
(
res
)
=
VT_I4
;
V_I4
(
res
)
=
val
;
...
...
@@ -417,9 +414,7 @@ static HRESULT Global_CLng(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARI
if
(
!
res
)
return
DISP_E_BADVARTYPE
;
V_VT
(
res
)
=
VT_I4
;
V_I4
(
res
)
=
i
;
return
S_OK
;
return
return_int
(
res
,
i
);
}
static
HRESULT
Global_CBool
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
...
...
@@ -1778,12 +1773,7 @@ static HRESULT Global_ScriptEngineMajorVersion(vbdisp_t *This, VARIANT *arg, uns
assert
(
args_cnt
==
0
);
if
(
res
)
{
V_VT
(
res
)
=
VT_I4
;
V_I4
(
res
)
=
VBSCRIPT_MAJOR_VERSION
;
}
return
S_OK
;
return
return_int
(
res
,
VBSCRIPT_MAJOR_VERSION
);
}
static
HRESULT
Global_ScriptEngineMinorVersion
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
...
...
@@ -1792,12 +1782,7 @@ static HRESULT Global_ScriptEngineMinorVersion(vbdisp_t *This, VARIANT *arg, uns
assert
(
args_cnt
==
0
);
if
(
res
)
{
V_VT
(
res
)
=
VT_I4
;
V_I4
(
res
)
=
VBSCRIPT_MINOR_VERSION
;
}
return
S_OK
;
return
return_int
(
res
,
VBSCRIPT_MINOR_VERSION
);
}
static
HRESULT
Global_ScriptEngineBuildVersion
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
...
...
@@ -1806,12 +1791,7 @@ static HRESULT Global_ScriptEngineBuildVersion(vbdisp_t *This, VARIANT *arg, uns
assert
(
args_cnt
==
0
);
if
(
res
)
{
V_VT
(
res
)
=
VT_I4
;
V_I4
(
res
)
=
VBSCRIPT_BUILD_VERSION
;
}
return
S_OK
;
return
return_int
(
res
,
VBSCRIPT_BUILD_VERSION
);
}
static
HRESULT
Global_FormatNumber
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
...
...
dlls/vbscript/tests/api.vbs
View file @
85b98992
...
...
@@ -242,6 +242,7 @@ Call ok(x = 2, "InStr returned " & x)
x
=
InStr
(
"abcd"
,
"bc"
)
Call
ok
(
x
=
2
,
"InStr returned "
&
x
)
Call
ok
(
getVT
(
x
)
=
"VT_I4*"
,
"getVT(InStr) returned "
&
getVT
(
x
))
x
=
InStr
(
"abc"
,
"bc"
)
Call
ok
(
x
=
2
,
"InStr returned "
&
x
)
...
...
@@ -335,6 +336,7 @@ Call ok(Len("") = 0, "Len() = " & Len(""))
Call
ok
(
Len
(
1
)
=
1
,
"Len(1) = "
&
Len
(
1
))
Call
ok
(
isNull
(
Len
(
null
)),
"Len(null) = "
&
Len
(
null
))
Call
ok
(
Len
(
empty
)
=
0
,
"Len(empty) = "
&
Len
(
empty
))
Call
ok
(
getVT
(
Len
(
"abc"
))
=
"VT_I4"
,
"getVT(Len(abc)) = "
&
getVT
(
Len
(
"abc"
)))
Call
ok
(
Space
(
1
)
=
" "
,
"Space(1) = "
&
Space
(
1
)
&
"
""
"
)
Call
ok
(
Space
(
0
)
=
""
,
"Space(0) = "
&
Space
(
0
)
&
"
""
"
)
...
...
dlls/vbscript/tests/error.vbs
View file @
85b98992
...
...
@@ -75,6 +75,7 @@ const RPC_S_SERVER_UNAVAILABLE = &h800706BA&
const
CO_E_SERVER_EXEC_FAILURE
=
&
h80080005&
call
ok
(
Err
.
Number
=
0
,
"Err.Number = "
&
Err
.
Number
)
call
ok
(
getVT
(
Err
.
Number
)
=
"VT_I4"
,
"getVT(Err.Number) = "
&
getVT
(
Err
.
Number
))
dim
calledFunc
...
...
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