From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- .../tomatoes/files/tomatoes-1.55-c_str.patch | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 games-arcade/tomatoes/files/tomatoes-1.55-c_str.patch (limited to 'games-arcade/tomatoes/files/tomatoes-1.55-c_str.patch') diff --git a/games-arcade/tomatoes/files/tomatoes-1.55-c_str.patch b/games-arcade/tomatoes/files/tomatoes-1.55-c_str.patch new file mode 100644 index 000000000000..dd6927e54153 --- /dev/null +++ b/games-arcade/tomatoes/files/tomatoes-1.55-c_str.patch @@ -0,0 +1,24 @@ +--- src/config.cpp.orig 2004-09-27 11:35:48.000000000 +0200 ++++ src/config.cpp 2006-02-13 00:00:01.000000000 +0100 +@@ -78,6 +78,7 @@ + // makefile. + char *get_config_location(bool write) { + #ifdef LINUX ++ static char *config_path = NULL; + // Get the path to the config file + string tmp = get_tomatoes_dir() + "config.cfg"; + +@@ -90,8 +91,11 @@ + } + fclose(ftest); + } +- +- return (char*)tmp.c_str(); ++ if (!config_path) { ++ config_path = new char[tmp.length()+1]; ++ strcpy(config_path,tmp.c_str()); ++ } ++ return config_path; + #endif + + // Return the CONFIG_DIR -- cgit v1.2.3