From 2eb8eb4e7eedece1f3233aa0d9889993c8575d3e Mon Sep 17 00:00:00 2001 From: Andrea Weikert Date: Sun, 14 Sep 2008 16:22:03 +0000 Subject: Bugfix: avoid crash with too long pathname. --- source/gameengine/Converter/KX_ConvertActuators.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/gameengine/Converter/KX_ConvertActuators.cpp') diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp index 799506aecaa..e8be8de95ed 100644 --- a/source/gameengine/Converter/KX_ConvertActuators.cpp +++ b/source/gameengine/Converter/KX_ConvertActuators.cpp @@ -74,6 +74,8 @@ #include "BKE_text.h" #include "BLI_blenlib.h" +#define FILE_MAX 240 // repeated here to avoid dependency from BKE_utildefines.h + #include "KX_NetworkMessageActuator.h" #ifdef WIN32 @@ -362,7 +364,7 @@ void BL_ConvertActuators(char* maggiename, if (soundact->sound) { /* Need to convert the samplename into absolute path * before checking if its loaded */ - char fullpath[sizeof(soundact->sound->name)]; + char fullpath[FILE_MAX]; /* dont modify soundact->sound->name, only change a copy */ BLI_strncpy(fullpath, soundact->sound->name, sizeof(fullpath)); -- cgit v1.2.3