Skip to content

Commit

Permalink
Fix incorrect zero indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamVenner committed Jan 7, 2022
1 parent dc2e8e7 commit 1c97c6d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "gmsv_reqwest"
version = "2.0.0"
version = "2.0.1"
authors = ["William Venner <william@venner.io>"]
edition = "2018"
publish = false
Expand Down
2 changes: 1 addition & 1 deletion src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ pub unsafe extern "C-unwind" fn callback_worker(lua: gmod::lua::State) -> i32 {
lua.push_binary_string(v.as_bytes());
lua.set_field(-2, k.as_ptr() as *const _);
} else {
lua.push_integer(lua.len(-1) as _);
lua.push_integer((lua.len(-1) + 1) as _);
lua.push_binary_string(v.as_bytes());
lua.set_table(-3);
}
Expand Down

0 comments on commit 1c97c6d

Please sign in to comment.