Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
ygopro-core
Commits
d644fb5b
Commit
d644fb5b
authored
Dec 14, 2021
by
mercury233
Committed by
GitHub
Dec 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix call_coroutine with no lua return (#424)
parent
7bd9d70c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
interpreter.cpp
interpreter.cpp
+8
-2
No files found.
interpreter.cpp
View file @
d644fb5b
...
@@ -581,8 +581,14 @@ int32 interpreter::call_coroutine(int32 f, uint32 param_count, uint32 * yield_va
...
@@ -581,8 +581,14 @@ int32 interpreter::call_coroutine(int32 f, uint32 param_count, uint32 * yield_va
int32
result
=
lua_resume
(
rthread
,
0
,
param_count
);
int32
result
=
lua_resume
(
rthread
,
0
,
param_count
);
if
(
result
==
0
)
{
if
(
result
==
0
)
{
coroutines
.
erase
(
f
);
coroutines
.
erase
(
f
);
if
(
yield_value
)
if
(
yield_value
)
{
*
yield_value
=
lua_isboolean
(
rthread
,
-
1
)
?
lua_toboolean
(
rthread
,
-
1
)
:
(
uint32
)
lua_tointeger
(
rthread
,
-
1
);
if
(
lua_gettop
(
rthread
)
==
0
)
*
yield_value
=
0
;
else
if
(
lua_isboolean
(
rthread
,
-
1
))
*
yield_value
=
lua_toboolean
(
rthread
,
-
1
);
else
*
yield_value
=
(
uint32
)
lua_tointeger
(
rthread
,
-
1
);
}
current_state
=
lua_state
;
current_state
=
lua_state
;
call_depth
--
;
call_depth
--
;
if
(
call_depth
==
0
)
{
if
(
call_depth
==
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