Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 217347 Details for
Bug 120787
Ebuild for reminiscence, a free rewrite of the Flashback's game engine.
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Updated patch, fixes the 'buffer overflow detected' error
reminiscence-homedir-fix.patch (text/plain), 1.38 KB, created by
Vitaly Minko
on 2010-01-25 02:06:41 UTC
(
hide
)
Description:
Updated patch, fixes the 'buffer overflow detected' error
Filename:
MIME Type:
Creator:
Vitaly Minko
Created:
2010-01-25 02:06:41 UTC
Size:
1.38 KB
patch
obsolete
>--- main.cpp.old 2006-01-30 20:26:46.000000000 +0100 >+++ main.cpp 2006-01-30 20:27:20.000000000 +0100 >@@ -16,6 +16,10 @@ > * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. > */ > >+#include <sys/types.h> >+#include <sys/stat.h> >+#include <unistd.h> >+ > #include "file.h" > #include "game.h" > #include "systemstub.h" >@@ -24,9 +28,9 @@ > "REminiscence - Flashback Interpreter\n" > "Usage: rs [OPTIONS]...\n" > " --datapath=PATH Path to data files (default 'DATA')\n" >- " --savepath=PATH Path to save files (default '.')"; >+ " --savepath=PATH Path to save files (default '~/.reminiscence/')\n"; > >-static bool parseOption(const char *arg, const char *longCmd, const char **opt) { >+static bool parseOption(char *arg, const char *longCmd, char **opt) { > bool handled = false; > if (arg[0] == '-' && arg[1] == '-') { > if (strncmp(arg + 2, longCmd, strlen(longCmd)) == 0) { >@@ -59,8 +63,18 @@ > > #undef main > int main(int argc, char *argv[]) { >- const char *dataPath = "DATA"; >- const char *savePath = "."; >+ struct stat sb; >+ char *dataPath = "DATA"; >+ char *savePath = (char *)malloc(256); >+ >+ snprintf(savePath, 255, "%s/.reminiscence", getenv("HOME")); >+ >+ if (stat(savePath, &sb)) { >+ if (mkdir(savePath, 0755) == -1) { >+ error("Unable to create %s directory", savePath); >+ } >+ } >+ > for (int i = 1; i < argc; ++i) { > bool opt = false; > if (strlen(argv[i]) >= 2) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 120787
:
78387
|
78532
|
78533
|
217344
|
217345
| 217347 |
385658
|
385660
|
385680