diff options
| -rw-r--r-- | ChangeLog | 1 | ||||
| -rw-r--r-- | plugins/dfOpenGL/cfg.c | 18 |
2 files changed, 13 insertions, 6 deletions
@@ -2,6 +2,7 @@ May 31, 2009 Wei Mingzhi <weimingzhi@gmail.com> * gui/Config.c, plugins/dfxvideo/cfg.c: Fixed invalid memory access. * debian/control: Added libxxf86vm-dev to Build-Depend. + * plugins/dfOpenGL/cfg.c: Don't use sprintf(). May 30, 2009 Wei Mingzhi <weimingzhi@gmail.com> diff --git a/plugins/dfOpenGL/cfg.c b/plugins/dfOpenGL/cfg.c index c048da68..6270e54a 100644 --- a/plugins/dfOpenGL/cfg.c +++ b/plugins/dfOpenGL/cfg.c @@ -86,20 +86,26 @@ void ExecCfg(char *arg) { strcpy(cfg, "./cfgDFOpenGL"); if (stat(cfg, &buf) != -1) { - sprintf(cfg, "%s %s", cfg, arg); - system(cfg); return; + strcat(cfg, " "); + strcat(cfg, arg); + system(cfg); + return; } strcpy(cfg, "./cfg/cfgDFOpenGL"); if (stat(cfg, &buf) != -1) { - sprintf(cfg, "%s %s", cfg, arg); - system(cfg); return; + strcat(cfg, " "); + strcat(cfg, arg); + system(cfg); + return; } sprintf(cfg, "%s/.pcsx/plugins/cfg/cfgDFOpenGL", getenv("HOME")); if (stat(cfg, &buf) != -1) { - sprintf(cfg, "%s %s", cfg, arg); - system(cfg); return; + strcat(cfg, " "); + strcat(cfg, arg); + system(cfg); + return; } printf("ERROR: cfgDFOpenGL file not found!\n"); |
