Page 1 of 1

[Rseding91] [16.0] Remote calls mangle tables

Posted: Wed Dec 13, 2017 3:19 pm
by bob809
Table arguments to remote calls get mangled e.g. {a = 1, b = 2} -> {a = 2}.

To reproduce:
  • Mod with a 1 line control.lua

    Code: Select all

    remote.add_interface("test", {test = function(x) game.print(serpent.block(x)) end})
  • In game run

    Code: Select all

    /c remote.call("test", "test", {a = 1, b = 2})
Expected output: {a = 1, b = 2}
Actual output: {a = 2}

Note that this works as expected if

Code: Select all

/c remote.add_interface("test", {test = function(x) game.print(serpent.block(x)) end})
/c remote.call("test", "test", {a = 1, b = 2})
is run in the console, the bug only occurs when the interface is declared in a mod (calling from a mod also causes this bug to appear).

Re: [Rseding91] [16.0] Remote calls mangle tables

Posted: Wed Dec 13, 2017 4:12 pm
by dewiniaid
Also getting this. Likely related to the fix for [Rseding91] [15.37] Circular references on remote interface = hard crash

Re: [Rseding91] [16.0] Remote calls mangle tables

Posted: Wed Dec 13, 2017 4:46 pm
by Rseding91
Thanks for the report and easy steps to reproduce the problem.

It's now fixed for the next version of 0.16.

Re: [Rseding91] [16.0] Remote calls mangle tables

Posted: Wed Dec 13, 2017 9:32 pm
by bob809
Thank you for the quick fix :)