Actually, this should be a memcpy().
authorRyan C. Gordon <icculus@icculus.org>
Tue, 20 Aug 2013 23:20:32 -0400
changeset 7676 013483acb374
parent 7675 230c1a5e1af5
child 7677 871d43c6968a
Actually, this should be a memcpy(). We already know the exact length we just allocated, and we plan to append our own null terminator to the end of the copy, so this makes more sense.
src/filesystem/beos/SDL_sysfilesystem.cc
--- a/src/filesystem/beos/SDL_sysfilesystem.cc	Tue Aug 20 21:29:40 2013 -0400
+++ b/src/filesystem/beos/SDL_sysfilesystem.cc	Tue Aug 20 23:20:32 2013 -0400
@@ -63,7 +63,7 @@
         return NULL;
     }
 
-    strcpy(retval, str);
+    SDL_memcpy(retval, str, len);
     retval[len] = '/';
     retval[len+1] = '\0';
     return retval;