Skip to content

Commit

Permalink
Fix CallRemoteFunction including format as part of the arguments
Browse files Browse the repository at this point in the history
ie putting format as "s" format inside the format... confusing I know
  • Loading branch information
Cheaterman committed Mar 13, 2024
1 parent a2586b6 commit a8ed769
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bindings/samp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5606,14 +5606,14 @@ WITH_GIL(pysamp_callremotefunction, PyObject *self, PyObject *args)
return NULL;
}

std::string format = ParamConverter::get_format(args);

// arguments = args[0], format, args[1:]
PyObject *one = PyLong_FromLong(1);
PyObject *slice = PySlice_New(one, NULL, NULL);
Py_DECREF(one);
PyObject *tail = PyObject_GetItem(args, slice);
Py_DECREF(slice);

std::string format = ParamConverter::get_format(tail);
arguments = Py_BuildValue("ssO", name, format.c_str(), tail);
Py_DECREF(tail);

Expand Down

0 comments on commit a8ed769

Please sign in to comment.