diff options
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_blenlib.h | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/util.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/BLI_blenlib.h b/source/blender/blenlib/BLI_blenlib.h index 8cc148db343..c73d0212869 100644 --- a/source/blender/blenlib/BLI_blenlib.h +++ b/source/blender/blenlib/BLI_blenlib.h @@ -184,7 +184,7 @@ char* BLI_strdup(const char *str); * @param len The number of bytes to duplicate * @retval Returns the duplicated string */ -char* BLI_strdupn(char *str, int len); +char* BLI_strdupn(const char *str, int len); /** * Like strncpy but ensures dst is always diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c index 84261b1d00c..688503269ea 100644 --- a/source/blender/blenlib/intern/util.c +++ b/source/blender/blenlib/intern/util.c @@ -626,7 +626,7 @@ void BLI_dlist_reinit(DynamicList *dlist) /*=====================================================================================*/ -char *BLI_strdupn(char *str, int len) { +char *BLI_strdupn(const char *str, int len) { char *n= MEM_mallocN(len+1, "strdup"); memcpy(n, str, len); n[len]= '\0'; |