Skip to content

Commit

Permalink
Fix bug with checking host tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
juliannguyen4 committed Feb 23, 2024
1 parent e4be826 commit 42ea3de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/client/type.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ static int AerospikeClient_Type_Init(AerospikeClient *self, PyObject *args,
PyObject *py_addr, *py_port, *py_tls_name;

if (PyTuple_Check(py_host)) {
if (PyTuple_Size(py_host) < 2 && PyTuple_Size(py_host) > 3) {
if (PyTuple_Size(py_host) < 2 || PyTuple_Size(py_host) > 3) {
error_code = INIT_HOST_TUPLE_INCORRECT_ITEM_COUNT_ERR;
goto CONSTRUCTOR_ERROR;
}
Expand Down

0 comments on commit 42ea3de

Please sign in to comment.