diff --git a/Lib/typemaps/strings.swg b/Lib/typemaps/strings.swg index b4f2bd7e2..6fb4e8904 100644 --- a/Lib/typemaps/strings.swg +++ b/Lib/typemaps/strings.swg @@ -506,7 +506,7 @@ SWIGINTERNINLINE SWIG_Object SWIG_From##CharName##Ptr(const Char *cptr) { - return SWIG_FromCharPtrAndSize(cptr, (cptr ? SWIG_CharPtrLen(cptr) : 0)); + return SWIG_FromCharPtrAndSize(cptr, (cptr ? SWIG_CharPtrLen(cptr) + 1: 0)); } }