diff options
author | Eduardo Julian | 2021-08-18 03:29:15 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-08-18 03:29:15 -0400 |
commit | e00ba096c8837abe85d366e0c1293c09dbe84d81 (patch) | |
tree | dc1f0955d4461ae30bb4945cddd74c462f1aee98 /lux-lua | |
parent | 3289b9dcf9d5d1c1e5c380e3185065c8fd32535f (diff) |
Some bug fixes.
Diffstat (limited to 'lux-lua')
-rw-r--r-- | lux-lua/source/program.lux | 10 |
1 files changed, 5 insertions, 5 deletions
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))) |