diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-06-14 18:19:16 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-06-27 00:04:19 +0300 |
commit | 26fda6dc8ef77e1acdc3529360a6d1cef23608e4 (patch) | |
tree | 1d7c75af8e5d30231093230b8f91af9165e3356f /py | |
parent | 00c904b47a4cac2cdf276346039f470f59c90c04 (diff) | |
download | micropython-26fda6dc8ef77e1acdc3529360a6d1cef23608e4.tar.gz micropython-26fda6dc8ef77e1acdc3529360a6d1cef23608e4.zip |
objstr: 64-bit issues.
Diffstat (limited to 'py')
-rw-r--r-- | py/objstr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objstr.c b/py/objstr.c index c732719dd5..714a170d0a 100644 --- a/py/objstr.c +++ b/py/objstr.c @@ -1446,7 +1446,7 @@ STATIC mp_obj_t str_count(uint n_args, const mp_obj_t *args) { // if needle_len is zero then we count each gap between characters as an occurrence if (needle_len == 0) { - return MP_OBJ_NEW_SMALL_INT(unichar_charlen((const char*)start, end - start) + 1); + return MP_OBJ_NEW_SMALL_INT((machine_uint_t)unichar_charlen((const char*)start, end - start) + 1); } // count the occurrences |