From e00ba096c8837abe85d366e0c1293c09dbe84d81 Mon Sep 17 00:00:00 2001
From: Eduardo Julian
Date: Wed, 18 Aug 2021 03:29:15 -0400
Subject: Some bug fixes.

---
 lux-lua/source/program.lux | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'lux-lua')

diff --git a/lux-lua/source/program.lux b/lux-lua/source/program.lux
index 2a530ba13..41df182c0 100644
--- a/lux-lua/source/program.lux
+++ b/lux-lua/source/program.lux
@@ -188,7 +188,7 @@
 
                    (net/sandius/rembulan/impl/DefaultTable
                     [] (rawget self {idx long}) java/lang/Object
-                    (|> value (array.read! (|> idx (:as Nat) dec)) maybe.trusted re_wrap))
+                    (|> value (array.read! (|> idx (:as Nat) --)) maybe.trusted re_wrap))
 
                    (net/sandius/rembulan/impl/DefaultTable
                     [] (rawget self {field java/lang/Object}) java/lang/Object
@@ -215,7 +215,7 @@
                       #.None
                       (case (ffi.check java/lang/Long field)
                         (#.Some idx)
-                        (|> value (array.read! (|> idx (:as Nat) dec)) maybe.trusted re_wrap)
+                        (|> value (array.read! (|> idx (:as Nat) --)) maybe.trusted re_wrap)
                         
                         #.None
                         (panic! (exception.construct ..unknown_kind_of_object field)))))
@@ -247,14 +247,14 @@
                         output (: (Array java/lang/Object)
                                   (array.new init_num_keys))]
                    (if (n.< num_keys idx)
-                     (case (net/sandius/rembulan/Table::get_idx (:as java/lang/Long (inc idx)) host_object)
+                     (case (net/sandius/rembulan/Table::get_idx (:as java/lang/Long (++ idx)) host_object)
                        #.None
-                       (recur num_keys (inc idx) output)
+                       (recur num_keys (++ idx) output)
 
                        (#.Some member)
                        (case (read member)
                          (#try.Success parsed_member)
-                         (recur num_keys (inc idx) (array.write! idx (:as java/lang/Object parsed_member) output))
+                         (recur num_keys (++ idx) (array.write! idx (:as java/lang/Object parsed_member) output))
 
                          (#try.Failure error)
                          (#try.Failure error)))
-- 
cgit v1.2.3