Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/gameengine/GamePlayer/ghost/GPG_ghost.cpp')
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_ghost.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index f5bd3a91c26..ea17b9adcfd 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -309,7 +309,7 @@ static void get_filename(int argc, char **argv, char *filename)
#endif // !_APPLE
}
-static BlendFileData *load_game_data(char *progname, char *filename = NULL, char *relativename = NULL)
+static BlendFileData *load_game_data(const char *progname, char *filename = NULL, char *relativename = NULL)
{
ReportList reports;
BlendFileData *bfd = NULL;
@@ -321,7 +321,7 @@ static BlendFileData *load_game_data(char *progname, char *filename = NULL, char
bfd= BLO_read_runtime(progname, &reports);
if (bfd) {
bfd->type= BLENFILETYPE_RUNTIME;
- strcpy(bfd->main->name, progname);
+ BLI_strncpy(bfd->main->name, progname, sizeof(bfd->main->name));
}
} else {
bfd= BLO_read_from_file(progname, &reports);
@@ -766,7 +766,7 @@ int main(int argc, char** argv)
char basedpath[240];
// base the actuator filename relative to the last file
- strcpy(basedpath, exitstring.Ptr());
+ BLI_strncpy(basedpath, exitstring.Ptr(), sizeof(basedpath));
BLI_path_abs(basedpath, pathname);
bfd = load_game_data(basedpath);