diff options
Diffstat (limited to 'ports/unix/modjni.c')
-rw-r--r-- | ports/unix/modjni.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/unix/modjni.c b/ports/unix/modjni.c index d953e7e015..dbce61aec1 100644 --- a/ports/unix/modjni.c +++ b/ports/unix/modjni.c @@ -337,7 +337,7 @@ static mp_obj_t new_jobject(jobject jo) { return mp_const_none; } else if (JJ(IsInstanceOf, jo, String_class)) { const char *s = JJ(GetStringUTFChars, jo, NULL); - mp_obj_t ret = mp_obj_new_str(s, strlen(s)); + mp_obj_t ret = mp_obj_new_str_from_cstr(s); JJ(ReleaseStringUTFChars, jo, s); return ret; } else if (JJ(IsInstanceOf, jo, Class_class)) { |