diff options
| author | Damien George <damien@micropython.org> | 2022-09-26 00:07:58 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-09-26 00:07:58 +1000 |
| commit | 3abcfb9aecd567c4c74fd3c99703f23c372b7445 (patch) | |
| tree | 1d733e7739dff81df4de0902c609622e32aff52f | |
| parent | e6d351318746495bf88d2c4bd7cbd81e94a2290e (diff) | |
esp32/modsocket: Use mp_obj_is_integer to test port type.
Because the value may be a big integer, which is still a valid type to use.
Fixes issue #9410.
Signed-off-by: Damien George <damien@micropython.org>
| -rw-r--r-- | ports/esp32/modsocket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/esp32/modsocket.c b/ports/esp32/modsocket.c index 334c5bae3..9812eb347 100644 --- a/ports/esp32/modsocket.c +++ b/ports/esp32/modsocket.c @@ -214,7 +214,7 @@ static int _socket_getaddrinfo2(const mp_obj_t host, const mp_obj_t portx, struc }; mp_obj_t port = portx; - if (mp_obj_is_small_int(port)) { + if (mp_obj_is_integer(port)) { // This is perverse, because lwip_getaddrinfo promptly converts it back to an int, but // that's the API we have to work with ... port = mp_obj_str_binary_op(MP_BINARY_OP_MODULO, mp_obj_new_str_via_qstr("%s", 2), port); |
