Skip to content

Commit

Permalink
Fixed standards mode load
Browse files Browse the repository at this point in the history
  • Loading branch information
MCJack123 committed Dec 31, 2023
1 parent a0f929e commit 7dac798
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Download ROM
run: sudo git clone --branch lua-5.2 https://github.com/MCJack123/craftos2-rom /usr/local/share/craftos
run: sudo git clone https://github.com/MCJack123/craftos2-rom /usr/local/share/craftos
- name: Install dependencies
run: |
sudo apt update
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Download ROM
run: sudo git clone --branch lua-5.2 https://github.com/MCJack123/craftos2-rom /usr/local/share/craftos
run: sudo git clone https://github.com/MCJack123/craftos2-rom /usr/local/share/craftos
- name: Install dependencies
run: |
sudo apt update
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
sudo apt install -y libsdl2-dev libsdl2-mixer-dev libhpdf-dev libpng++-dev libwebp-dev libpoco-dev libncurses5-dev nodejs
- name: Build standalone ROM
run: |
git clone --branch lua-5.2 https://github.com/MCJack123/craftos2-rom
git clone https://github.com/MCJack123/craftos2-rom
cd craftos2-rom
node ../resources/packStandaloneROM.js
cd ..
Expand Down Expand Up @@ -116,8 +116,8 @@ jobs:
- uses: actions/checkout@v1
- name: Download ROM & CC:T
run: |
sudo git clone --branch lua-5.2 https://github.com/MCJack123/craftos2-rom /usr/local/share/craftos
git clone --branch v1.20.1-1.109.0 https://github.com/cc-tweaked/CC-Tweaked ../CC-Tweaked
sudo git clone https://github.com/MCJack123/craftos2-rom /usr/local/share/craftos
git clone --branch v1.20.1-1.109.2 https://github.com/cc-tweaked/CC-Tweaked ../CC-Tweaked
patch -p1 -d ../CC-Tweaked < resources/CCT-Tests.patch
- name: Install dependencies
run: |
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Download ROM
run: git clone --branch lua-5.2 https://github.com/MCJack123/craftos2-rom "C:\Program Files\CraftOS-PC"
run: git clone https://github.com/MCJack123/craftos2-rom "C:\Program Files\CraftOS-PC"
- name: Restore vcpkg cache
uses: lukka/run-vcpkg@v10
with:
Expand Down
1 change: 0 additions & 1 deletion CraftOS-PC 2.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,6 @@
<None Include=".github\workflows\main.yml" />
<None Include=".github\workflows\release.yml" />
<None Include=".gitignore" />
<None Include=".travis.yml" />
<None Include="configure.ac" />
<None Include="DOCUMENTATION.md" />
<None Include="LICENSE" />
Expand Down
3 changes: 0 additions & 3 deletions CraftOS-PC 2.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@
</Filter>
</ItemGroup>
<ItemGroup>
<None Include=".travis.yml">
<Filter>Other Files</Filter>
</None>
<None Include="DOCUMENTATION.md">
<Filter>Other Files</Filter>
</None>
Expand Down
2 changes: 1 addition & 1 deletion craftos2-lua
4 changes: 2 additions & 2 deletions src/Computer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ static int yieldable_load(lua_State *L) {
if (status == 0) { /* OK? */
if (env != 0) { /* 'env' parameter? */
lua_pushvalue(L, env); /* environment for loaded function */
if (!lua_setupvalue(L, 1, -2)) /* set it as 1st upvalue */
if (!lua_setupvalue(L, -2, 1)) /* set it as 1st upvalue */
lua_pop(L, 1); /* remove 'env' if not used by previous call */
}
return 1;
Expand Down Expand Up @@ -354,7 +354,7 @@ static int yieldable_load(lua_State *L) {
}
if (ctx->argcount == 1 && ctx->envidx != 0) { /* OK? */
lua_pushvalue(L, ctx->envidx); /* environment for loaded function */
if (!lua_setupvalue(L, 1, -2)) /* set it as 1st upvalue */
if (!lua_setupvalue(L, -2, 1)) /* set it as 1st upvalue */
lua_pop(L, 1); /* remove 'env' if not used by previous call */
}
return ctx->argcount;
Expand Down

0 comments on commit 7dac798

Please sign in to comment.