diff options
Diffstat (limited to 'engines/sci/sci_memory.cpp')
-rw-r--r-- | engines/sci/sci_memory.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/engines/sci/sci_memory.cpp b/engines/sci/sci_memory.cpp index 7fa3a5d4aa..c7bd78c16e 100644 --- a/engines/sci/sci_memory.cpp +++ b/engines/sci/sci_memory.cpp @@ -95,24 +95,4 @@ char *sci_strdup(const char *src) { return (char*)res; } -char *sci_strndup(const char *src, size_t length) { - void *res; - char *strres; - size_t rlen = (int)MIN(strlen(src), length) + 1; - - if (!src) { - fprintf(stderr, "_SCI_STRNDUP() [%s (%s) : %u]\n", - __FILE__, "", __LINE__); - fprintf(stderr, " attempt to strndup NULL pointer\n"); - BREAKPOINT(); - } - ALLOC_MEM((res = malloc(rlen)), rlen, __FILE__, __LINE__, "") - - strres = (char *)res; - strncpy(strres, src, rlen); - strres[rlen - 1] = 0; - - return strres; -} - } // End of namespace Sci |