Skip to content
Permalink
Browse files

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.
  • Loading branch information
icculus committed Aug 21, 2013
1 parent 38dc821 commit 3984c7d8e377cbd000fe1fdb166ed043ba1cda62
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/filesystem/beos/SDL_sysfilesystem.cc
@@ -63,7 +63,7 @@ SDL_GetBasePath(void)
return NULL;
}

strcpy(retval, str);
SDL_memcpy(retval, str, len);
retval[len] = '/';
retval[len+1] = '\0';
return retval;

0 comments on commit 3984c7d

Please sign in to comment.