summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lib/r/rfragments.swg2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/r/rfragments.swg b/Lib/r/rfragments.swg
index 1f54b6987..67944b2fe 100644
--- a/Lib/r/rfragments.swg
+++ b/Lib/r/rfragments.swg
@@ -150,7 +150,7 @@ SWIG_AsCharPtrAndSize(SEXP obj, char** cptr, size_t* psize, int *alloc)
SWIGINTERN char *
SWIG_strdup(const char *str)
{
- char *newstr = %reinterpret_cast(malloc(strlen(str)), char *);
+ char *newstr = %reinterpret_cast(malloc(strlen(str) + 1), char *);
return strcpy(newstr, str);
}
}