Skip to content

Commit

Permalink
Actually, this should be a memcpy().
Browse files Browse the repository at this point in the history
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 3984c7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/filesystem/beos/SDL_sysfilesystem.cc
Expand Up @@ -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;
Expand Down

0 comments on commit 3984c7d

Please sign in to comment.