aboutsummaryrefslogtreecommitdiff
path: root/py/objstr.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-09-19 21:19:23 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-09-19 21:21:12 +0300
commitfc9a6dd09e77c34ef04bab57e73bfcb08bc78bb4 (patch)
treea56c911ef46a6ffdbf107023aba356a88f323e98 /py/objstr.c
parent44f0a4d1e7a315c8d2b21fc4b0471d88e382a91e (diff)
py/objstr: strip: Don't strip "\0" by default.
An issue was due to incorrectly taking size of default strip characters set.
Diffstat (limited to 'py/objstr.c')
-rw-r--r--py/objstr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objstr.c b/py/objstr.c
index f6214f80c..11bfb41fc 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -777,7 +777,7 @@ STATIC mp_obj_t str_uni_strip(int type, size_t n_args, const mp_obj_t *args) {
if (n_args == 1) {
chars_to_del = whitespace;
- chars_to_del_len = sizeof(whitespace);
+ chars_to_del_len = sizeof(whitespace) - 1;
} else {
if (mp_obj_get_type(args[1]) != self_type) {
bad_implicit_conversion(args[1]);