summaryrefslogtreecommitdiffstatshomepage
path: root/py/objstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/objstr.c')
-rw-r--r--py/objstr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/py/objstr.c b/py/objstr.c
index 6ec997f4bf..9d34609882 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -472,6 +472,9 @@ STATIC mp_obj_t str_split(uint n_args, const mp_obj_t *args) {
} else {
// sep given
+ if (mp_obj_get_type(sep) != self_type) {
+ arg_type_mixup();
+ }
uint sep_len;
const char *sep_str = mp_obj_str_get_data(sep, &sep_len);