--- /dev/null
+--- JSDL.cpp.old 2016-01-04 10:42:56.404316856 +0100
++++ JSDL.cpp 2016-01-04 10:51:16.744255312 +0100
+@@ -47,14 +47,14 @@
+ if (!globalSettings.batch) {\r
+ if (SDL_Init(SDL_INIT_TIMER | SDL_INIT_VIDEO) == -1) {\r
+ char output[120];\r
+- sprintf(output, SDL_GetError());\r
++ strcpy(output, SDL_GetError());\r
+ throw runtime_error(output);\r
+ }\r
+ \r
+ if (!globalSettings.disableSound) {\r
+ if (SDL_InitSubSystem(SDL_INIT_AUDIO) == -1) {\r
+ char error[120];\r
+- sprintf(error, SDL_GetError());\r
++ strcpy(error, SDL_GetError());\r
+ string errorStr = error;\r
+ errorStr += ", continuing without initialising sound.";\r
+ WriteLog(errorStr);\r
+@@ -81,7 +81,7 @@
+ //4096 is rather a large chunksize, should be smaller if I add sound effects\r
+ if (Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT, 2, 4096) == -1) {\r
+ char output[100];\r
+- sprintf(output, Mix_GetError());\r
++ strcpy(output, Mix_GetError());\r
+ throw runtime_error(output);\r
+ }\r
+ }\r
+@@ -101,7 +101,7 @@
+ if (screen == NULL) {\r
+ SDL_Quit();\r
+ char output[120];\r
+- sprintf(output, SDL_GetError());\r
++ strcpy(output, SDL_GetError());\r
+ throw runtime_error(output);\r
+ }\r
+ }\r
+@@ -114,7 +114,7 @@
+ \r
+ if (loadingSurface == NULL) {\r
+ char output[100];\r
+- sprintf(output, IMG_GetError());\r
++ strcpy(output, IMG_GetError());\r
+ throw runtime_error(output);\r
+ }\r
+ \r
+@@ -308,7 +308,7 @@
+ \r
+ if (!theMusic) {\r
+ char output[100];\r
+- sprintf(output, Mix_GetError());\r
++ strcpy(output, Mix_GetError());\r
+ throw runtime_error(output);\r
+ }\r
+ }\r
+@@ -319,7 +319,7 @@
+ \r
+ if (Mix_PlayMusic(theMusic, -1) == -1) {\r
+ char output[100];\r
+- sprintf(output, Mix_GetError());\r
++ strcpy(output, Mix_GetError());\r
+ throw runtime_error(output);\r
+ }\r
+ }\r
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
"${FILESDIR}"/${P}-boost.patch \
"${FILESDIR}"/${P}-gcc43.patch \
"${FILESDIR}"/${P}-boost-1.50.patch \
+ "${FILESDIR}"/${P}-format.patch \
"${FILESDIR}"/${P}-gentoo.patch
sed -i "s:@GAMES_DATADIR@:${GAMES_DATADIR}:" \
Main.cpp || die