summaryrefslogtreecommitdiff
path: root/protocols/Xfire/src/iniupdater.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-03-01 20:50:59 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-03-01 20:50:59 +0000
commitd6331b6e7bbef9facc7e6c8bdc42ed4e7b58668d (patch)
tree44032474a6abe389fcc2c5302743c019f95d7074 /protocols/Xfire/src/iniupdater.cpp
parentcbf1506b70dfa0e5e6a7ef9107b6e0f127d7724e (diff)
XFire:
- Major cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@12294 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Xfire/src/iniupdater.cpp')
-rw-r--r--protocols/Xfire/src/iniupdater.cpp28
1 files changed, 10 insertions, 18 deletions
diff --git a/protocols/Xfire/src/iniupdater.cpp b/protocols/Xfire/src/iniupdater.cpp
index f5f1e97aeb..bbd63279b8 100644
--- a/protocols/Xfire/src/iniupdater.cpp
+++ b/protocols/Xfire/src/iniupdater.cpp
@@ -49,17 +49,13 @@ INT_PTR CALLBACK DlgUpdateDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
void UpdateMyXFireIni(LPVOID dummy) {
char request[1024];
- char file[1024];
- char file2[1024];
- char file3[1024];
+ char *inipath = XFireGetFoldersPath("IniFile");
//ini pfad rausbekommen
- strcpy(file, XFireGetFoldersPath("IniFile"));
- strcpy(file2, file);
- strcpy(file3, file);
- strcat(file, "xfire_games.new");
- strcat(file2, "xfire_games.ini");
- strcat(file3, "xfire_games.old");
+ char file[1024], file2[1024], file3[1024];
+ mir_snprintf(file,SIZEOF(file), "%sxfire_games.new",inipath);
+ mir_snprintf(file2,SIZEOF(file2), "%sxfire_games.ini",inipath);
+ mir_snprintf(file3,SIZEOF(file3), "%sxfire_games.old",inipath);
mir_snprintf(request, SIZEOF(request), "%s%d", INI_URLREQUEST, getfilesize(file2));
@@ -89,17 +85,13 @@ void UpdateMyXFireIni(LPVOID dummy) {
void UpdateMyIcons(LPVOID dummy) {
char request[1024];
- char file[1024];
- char file2[1024];
- char file3[1024];
+ char *inipath = XFireGetFoldersPath("IconsFile");
//ini pfad rausbekommen
- strcpy(file, XFireGetFoldersPath("IconsFile"));
- strcpy(file2, file);
- strcpy(file3, file);
- strcat(file, "icons.new");
- strcat(file2, "icons.dll");
- strcat(file3, "icons.old");
+ char file[1024], file2[1024], file3[1024];
+ mir_snprintf(file,SIZEOF(file), "%sxfire_games.new",inipath);
+ mir_snprintf(file2,SIZEOF(file2), "%sxfire_games.ini",inipath);
+ mir_snprintf(file3,SIZEOF(file3), "%sxfire_games.old",inipath);
mir_snprintf(request, SIZEOF(request), "%s%d", ICO_URLREQUEST, getfilesize(file2));