foxygit / fake-08-xbox360 Log in
commit 1b80ed4848fe3bc25735081073c3f254eb884100
Author:     Jon Bell <j.to.the.bell@gmail.com>
AuthorDate: Sat Jan 10 21:27:42 2026 -0700
Commit:     Jon Bell <j.to.the.bell@gmail.com>
CommitDate: Sat Jan 10 21:27:42 2026 -0700

    Update z8lua with fix for short print (treat as expression, not statement- allowing return values)
---
 libs/z8lua                                         |   2 +-
 test/carts/return_assign_shortprint_test.p8        |  26 +++++++++++++++++++++
 .../return_assign_shortprint_test_f01.png          | Bin 0 -> 573 bytes
 test/endtoendtests.cpp                             |  16 +++++++++++++
 4 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/libs/z8lua b/libs/z8lua
index 1c73cd0..01c9caa 160000
--- a/libs/z8lua
+++ b/libs/z8lua
@@ -1 +1 @@
-Subproject commit 1c73cd0f1523f11b8723063163487b3c6ce0720d
+Subproject commit 01c9caa205c43c55753d6ceab56460064b16efc3
diff --git a/test/carts/return_assign_shortprint_test.p8 b/test/carts/return_assign_shortprint_test.p8
new file mode 100644
index 0000000..0b3f5cb
--- /dev/null
+++ b/test/carts/return_assign_shortprint_test.p8
@@ -0,0 +1,26 @@
+pico-8 cartridge // http://www.pico-8.com
+version 43
+__lua__
+local ol = split"\|f,\-f,\-h,\+fh,\+hh,\|i,\|h"
+function outlined_text(s, x, y, c1, c2)
+	for p in all(ol) do
+	 ?p..s, x, y, c1
+	end
+
+	thing=?s, x, y, c2
+	--return thing
+	return ?s, x, y, c2
+end
+
+function _draw()
+ cls()
+ outlined_text("all levels unlocked!", 12, 106, 4, 13)
+ ?"all levels unlocked!", 0, 0, 4, 13
+end
+__gfx__
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
diff --git a/test/carts/screenshots/return_assign_shortprint_test_f01.png b/test/carts/screenshots/return_assign_shortprint_test_f01.png
new file mode 100644
index 0000000..503ff81
Binary files /dev/null and b/test/carts/screenshots/return_assign_shortprint_test_f01.png differ
diff --git a/test/endtoendtests.cpp b/test/endtoendtests.cpp
index fda493d..ec8f197 100644
--- a/test/endtoendtests.cpp
+++ b/test/endtoendtests.cpp
@@ -1072,6 +1072,22 @@ TEST_CASE("Loading and running carts") {

         vm->CloseCart();
     }
+    SUBCASE("short print (?) return and assignment test"){
+        vm->LoadCart("return_assign_shortprint_test.p8", false);
+        vm->vm_run();
+        vm->Step();
+
+        SUBCASE("No error reported"){
+            CHECK(vm->GetBiosError() == "");
+        }
+        SUBCASE("screen matches screenshot"){
+            vm->Step();
+
+            CHECK(verifyScreenshot(vm, host, "carts/screenshots/return_assign_shortprint_test_f01.png"));
+        }
+
+        vm->CloseCart();
+    }

     delete vm;
     delete host;