Skip to content

Commit 26fda6d

Browse files
committed
objstr: 64-bit issues.
1 parent 00c904b commit 26fda6d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

py/objstr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1446,7 +1446,7 @@ STATIC mp_obj_t str_count(uint n_args, const mp_obj_t *args) {
14461446

14471447
// if needle_len is zero then we count each gap between characters as an occurrence
14481448
if (needle_len == 0) {
1449-
return MP_OBJ_NEW_SMALL_INT(unichar_charlen((const char*)start, end - start) + 1);
1449+
return MP_OBJ_NEW_SMALL_INT((machine_uint_t)unichar_charlen((const char*)start, end - start) + 1);
14501450
}
14511451

14521452
// count the occurrences

0 commit comments

Comments
 (0)