diff options
Diffstat (limited to 'protocols/Xfire/src')
-rw-r--r-- | protocols/Xfire/src/SHA1.cpp | 8 | ||||
-rw-r--r-- | protocols/Xfire/src/Xfire_base.cpp | 28 | ||||
-rw-r--r-- | protocols/Xfire/src/Xfire_icon_mng.cpp | 2 | ||||
-rw-r--r-- | protocols/Xfire/src/Xfire_voicechat.cpp | 2 | ||||
-rw-r--r-- | protocols/Xfire/src/addgamedialog.cpp | 16 | ||||
-rw-r--r-- | protocols/Xfire/src/all_statusmsg.cpp | 2 | ||||
-rw-r--r-- | protocols/Xfire/src/buddylist.cpp | 2 | ||||
-rw-r--r-- | protocols/Xfire/src/clientloginpacket.cpp | 2 | ||||
-rw-r--r-- | protocols/Xfire/src/iniupdater.cpp | 4 | ||||
-rw-r--r-- | protocols/Xfire/src/main.cpp | 10 | ||||
-rw-r--r-- | protocols/Xfire/src/processbuddyinfo.cpp | 6 | ||||
-rw-r--r-- | protocols/Xfire/src/tools.cpp | 4 | ||||
-rw-r--r-- | protocols/Xfire/src/userdetails.cpp | 16 | ||||
-rw-r--r-- | protocols/Xfire/src/variables.cpp | 4 |
14 files changed, 53 insertions, 53 deletions
diff --git a/protocols/Xfire/src/SHA1.cpp b/protocols/Xfire/src/SHA1.cpp index f296b563cd..cd0fe75149 100644 --- a/protocols/Xfire/src/SHA1.cpp +++ b/protocols/Xfire/src/SHA1.cpp @@ -232,23 +232,23 @@ void CSHA1::ReportHash(char *szReport, unsigned char uReportType) if(uReportType == REPORT_HEX)
{
- sprintf(szTemp, "%02X", m_digest[0]);
+ mir_snprintf(szTemp, SIZEOF(szTemp), "%02X", m_digest[0]);
strcat(szReport, szTemp);
for(i = 1; i < 20; i++)
{
- sprintf(szTemp, " %02X", m_digest[i]);
+ mir_snprintf(szTemp, SIZEOF(szTemp), " %02X", m_digest[i]);
strcat(szReport, szTemp);
}
}
else if(uReportType == REPORT_DIGIT)
{
- sprintf(szTemp, "%u", m_digest[0]);
+ mir_snprintf(szTemp, SIZEOF(szTemp), "%u", m_digest[0]);
strcat(szReport, szTemp);
for(i = 1; i < 20; i++)
{
- sprintf(szTemp, " %u", m_digest[i]);
+ mir_snprintf(szTemp, SIZEOF(szTemp), " %u", m_digest[i]);
strcat(szReport, szTemp);
}
}
diff --git a/protocols/Xfire/src/Xfire_base.cpp b/protocols/Xfire/src/Xfire_base.cpp index a2923968da..13f7c49afa 100644 --- a/protocols/Xfire/src/Xfire_base.cpp +++ b/protocols/Xfire/src/Xfire_base.cpp @@ -173,7 +173,7 @@ void Xfire_base::writeStringtoDB(char*name,unsigned int dbid,int id,char*val) return;
//wert aus der dblesen
- sprintf_s(temp,128,"%s_%i_%i",name,dbid,id);
+ mir_snprintf(temp, 128, "%s_%i_%i", name, dbid, id);
db_set_s(NULL, protocolname, temp,val);
}
@@ -185,7 +185,7 @@ void Xfire_base::writeStringtoDB(char*name,unsigned int dbid,char*val) return;
//wert aus der dblesen
- sprintf_s(temp,128,"%s_%i",name,dbid);
+ mir_snprintf(temp, 128, "%s_%i", name, dbid);
db_set_s(NULL, protocolname, temp,val);
}
@@ -197,7 +197,7 @@ void Xfire_base::writeUtf8StringtoDB(char*name,unsigned int dbid,int id,char*val return;
//wert aus der dblesen
- sprintf_s(temp,128,"%s_%i_%i",name,dbid,id);
+ mir_snprintf(temp, 128, "%s_%i_%i", name, dbid, id);
db_set_utf(NULL, protocolname, temp,val);
}
@@ -209,7 +209,7 @@ void Xfire_base::writeUtf8StringtoDB(char*name,unsigned int dbid,char*val) return;
//wert aus der dblesen
- sprintf_s(temp,128,"%s_%i",name,dbid);
+ mir_snprintf(temp, 128, "%s_%i", name, dbid);
db_set_utf(NULL, protocolname, temp,val);
}
@@ -222,7 +222,7 @@ void Xfire_base::writeBytetoDB(char*name,unsigned int dbid,int val) return;
//wert aus der dblesen
- sprintf_s(temp,128,"%s_%i",name,dbid);
+ mir_snprintf(temp, 128, "%s_%i", name, dbid);
db_set_b(NULL, protocolname, temp, val);
}
@@ -234,7 +234,7 @@ void Xfire_base::writeWordtoDB(char*name,unsigned int dbid,int val) return;
//wert aus der dblesen
- sprintf_s(temp,128,"%s_%i",name,dbid);
+ mir_snprintf(temp, 128, "%s_%i", name, dbid);
db_set_w(NULL, protocolname, temp, val);
}
@@ -247,7 +247,7 @@ unsigned char Xfire_base::readBytefromDB(char*name,unsigned int dbid,int default return 0;
//wert aus der dblesen
- sprintf_s(temp,128,"%s_%i",name,dbid);
+ mir_snprintf(temp, 128, "%s_%i", name, dbid);
return db_get_b(NULL, protocolname, temp, defaultval);
}
@@ -259,7 +259,7 @@ unsigned int Xfire_base::readWordfromDB(char*name,unsigned int dbid,int defaultv return 0;
//wert aus der dblesen
- sprintf_s(temp,128,"%s_%i",name,dbid);
+ mir_snprintf(temp, 128, "%s_%i", name, dbid);
return db_get_w(NULL, protocolname, temp, defaultval);
}
@@ -271,7 +271,7 @@ BOOL Xfire_base::removeDBEntry(char*name,unsigned int dbid) return 0;
//wert aus der dblesen
- sprintf_s(temp,128,"%s_%i",name,dbid);
+ mir_snprintf(temp, 128, "%s_%i", name, dbid);
//eintrag entfernen
if(!db_get(NULL, protocolname, temp,&dbv))
@@ -292,7 +292,7 @@ BOOL Xfire_base::removeDBEntry(char*name,unsigned int dbid,int id) return 0;
//wert aus der dblesen
- sprintf_s(temp,128,"%s_%i_%i",name,dbid,id);
+ mir_snprintf(temp, 128, "%s_%i_%i", name, dbid, id);
//eintrag entfernen
if(!db_get(NULL, protocolname, temp,&dbv))
@@ -463,7 +463,7 @@ BOOL Xfire_base::getIniValue(unsigned int gameid,unsigned int subid,const char* return FALSE; //kein pfad bug?!?!
if(subid==0) {
- sprintf_s(idstring,15,"%d",gameid);
+ mir_snprintf(idstring, 15, "%d", gameid);
if(xfire_GetPrivateProfileString(idstring, valname, "", out, sizeofout, path))
return TRUE;
@@ -471,7 +471,7 @@ BOOL Xfire_base::getIniValue(unsigned int gameid,unsigned int subid,const char* subid++;
}
- sprintf_s(idstring,15,"%d_%d",gameid,subid);
+ mir_snprintf(idstring, 15, "%d_%d", gameid, subid);
if(xfire_GetPrivateProfileString(idstring, valname, "", out, sizeofout, path))
return TRUE;
@@ -506,9 +506,9 @@ BOOL Xfire_base::getGamename(unsigned int gameid,char* out,int outsize){ //customnamen laden, wenn vorhanden
DBVARIANT dbv;
char dbstr[80]="";
- sprintf_s(dbstr,XFIRE_MAXSIZEOFGAMENAME,"customgamename_%d",gameid);
+ mir_snprintf(dbstr, XFIRE_MAXSIZEOFGAMENAME, "customgamename_%d", gameid);
if(!db_get(NULL,protocolname,dbstr,&dbv)) {
- sprintf_s(out,outsize,"%s",dbv.pszVal);
+ mir_snprintf(out, outsize, "%s", dbv.pszVal);
db_free(&dbv);
return TRUE;
}
diff --git a/protocols/Xfire/src/Xfire_icon_mng.cpp b/protocols/Xfire/src/Xfire_icon_mng.cpp index 0a583a6998..14abababea 100644 --- a/protocols/Xfire/src/Xfire_icon_mng.cpp +++ b/protocols/Xfire/src/Xfire_icon_mng.cpp @@ -137,7 +137,7 @@ Xfire_icon_cache Xfire_icon_mng::LoadGameIcon(unsigned int gameid) { if(hIconDll) {
char resourcename[255]="";
//kurznamen des spiels uppercasen und .ICO anhängen
- sprintf_s(resourcename,255,"XF_%s.ICO",shortname);
+ mir_snprintf(resourcename,255,"XF_%s.ICO",shortname);
Xfire_base::strtoupper(resourcename);
//versuche die resource zufinden
diff --git a/protocols/Xfire/src/Xfire_voicechat.cpp b/protocols/Xfire/src/Xfire_voicechat.cpp index d14ae6f9d5..7a3ce804d2 100644 --- a/protocols/Xfire/src/Xfire_voicechat.cpp +++ b/protocols/Xfire/src/Xfire_voicechat.cpp @@ -165,7 +165,7 @@ void Xfire_voicechat::writeToDatabase(SendGameStatus2Packet* packet) { return;
}
//ip speichern
- sprintf_s(temp,32,"%d.%d.%d.%d:%d",(unsigned char)packet->ip[3],(unsigned char)packet->ip[2],(unsigned char)packet->ip[1],(unsigned char)packet->ip[0],packet->port);
+ mir_snprintf(temp,32,"%d.%d.%d.%d:%d",(unsigned char)packet->ip[3],(unsigned char)packet->ip[2],(unsigned char)packet->ip[1],(unsigned char)packet->ip[0],packet->port);
db_set_s(NULL, protocolname, "VServerIP", temp);
//namen jeh nach id schreiben
switch(packet->gameid) {
diff --git a/protocols/Xfire/src/addgamedialog.cpp b/protocols/Xfire/src/addgamedialog.cpp index 541d5eca30..0ea63d9219 100644 --- a/protocols/Xfire/src/addgamedialog.cpp +++ b/protocols/Xfire/src/addgamedialog.cpp @@ -144,12 +144,12 @@ static void FillGameList( LPVOID hwndDlg ) { if(z2!=zahlbuffer2)
{
listentry.gameid=MAKELONG(gameid,atoi(zahlbuffer2));
- sprintf_s(gameidtemp,10,"%d_%d",gameid,atoi(zahlbuffer2));
+ mir_snprintf(gameidtemp,10,"%d_%d",gameid,atoi(zahlbuffer2));
}
else
{
listentry.gameid=gameid;
- sprintf_s(gameidtemp,10,"%d",gameid);
+ mir_snprintf(gameidtemp,10,"%d",gameid);
}
@@ -265,7 +265,7 @@ BOOL OpenFileDialog(HWND hwndDlg,OPENFILENAME*ofn,char*exe) { //kein backslash dann normal ret als exenamen verwenden
if((int)exename==1) exename=exe;
//filterstring aufbauen
- sprintf(szFilter,"%s|%s|%s|*.*|",exename,exename,Translate("All Files"));
+ mir_snprintf(szFilter, SIZEOF(szFilter), "%s|%s|%s|*.*|", exename, exename, Translate("All Files"));
//umbruch in 0 wandeln
unsigned int sizeFilter=strlen(szFilter);
for(unsigned int i=0;i<sizeFilter;i++)
@@ -345,13 +345,13 @@ INT_PTR CALLBACK DlgAddGameProc (HWND hwndDlg, int gameid2=HIWORD(gameids);
if(gameid2!=0)
- sprintf_s(gameidtemp,10,"%d_%d",gameid1,gameid2);
+ mir_snprintf(gameidtemp,10,"%d_%d",gameid1,gameid2);
else
- sprintf_s(gameidtemp,10,"%d",gameid1);
+ mir_snprintf(gameidtemp,10,"%d",gameid1);
//spielnamen holen
if(xfire_GetPrivateProfileString(gameidtemp, "LongName", "", ret, 512, inipath)) {
- sprintf_s(gameidtemp,10,"%d",gameid1);
+ mir_snprintf(gameidtemp,10,"%d",gameid1);
//einige felder vorbelegen
SetDlgItemText(hPage,IDC_ADD_NAME,ret);
@@ -389,9 +389,9 @@ INT_PTR CALLBACK DlgAddGameProc (HWND hwndDlg, char ret[512];
if(gameid2!=0)
- sprintf_s(gameidtemp,10,"%d_%d",gameid1,gameid2);
+ mir_snprintf(gameidtemp,10,"%d_%d",gameid1,gameid2);
else
- sprintf_s(gameidtemp,10,"%d",gameid1);
+ mir_snprintf(gameidtemp,10,"%d",gameid1);
//neuen gameeintrag anlegen
Xfire_game* newgame=new Xfire_game();
diff --git a/protocols/Xfire/src/all_statusmsg.cpp b/protocols/Xfire/src/all_statusmsg.cpp index b033b4e3bb..62661afdf4 100644 --- a/protocols/Xfire/src/all_statusmsg.cpp +++ b/protocols/Xfire/src/all_statusmsg.cpp @@ -64,7 +64,7 @@ BOOL BackupStatusMsg() { XFireLog("Get Status of %s ...",temp[i]->szModuleName);
char ttemp[128]="";
- sprintf_s(ttemp,128,"%s%s",temp[i]->szModuleName,PS_SETAWAYMSG);
+ mir_snprintf(ttemp,128,"%s%s",temp[i]->szModuleName,PS_SETAWAYMSG);
//xfire wird geskipped, offline prots und invs prots auch, und locked status prots auch
if(!temp[i]->bIsEnabled||statusid==ID_STATUS_INVISIBLE||statusid==ID_STATUS_OFFLINE||!lstrcmpiA( temp[i]->szModuleName, protocolname )||!ServiceExists(ttemp)||db_get_b(NULL,temp[i]->szModuleName,"LockMainStatus",0)==1)
diff --git a/protocols/Xfire/src/buddylist.cpp b/protocols/Xfire/src/buddylist.cpp index d2ae949d7a..6106834065 100644 --- a/protocols/Xfire/src/buddylist.cpp +++ b/protocols/Xfire/src/buddylist.cpp @@ -146,7 +146,7 @@ namespace xfirelib { /* ## buddies im miranda verarbietn */ char temp[255]; char * dummy; - sprintf_s(temp,255,"Clan_%d",entry->clanid); + mir_snprintf(temp,255,"Clan_%d",entry->clanid); DBVARIANT dbv; if(!db_get(NULL,protocolname,temp,&dbv)) diff --git a/protocols/Xfire/src/clientloginpacket.cpp b/protocols/Xfire/src/clientloginpacket.cpp index 30a28cc7eb..1746b9fdf8 100644 --- a/protocols/Xfire/src/clientloginpacket.cpp +++ b/protocols/Xfire/src/clientloginpacket.cpp @@ -111,7 +111,7 @@ void ClientLoginPacket::hashSha1(const char *string, unsigned char *sha){ result[0] = 0; char szTemp[16]; for(int i = 0 ; i < 20 ; i++) { - sprintf(szTemp, "%02x", temp[i]); + mir_snprintf(szTemp, SIZEOF(szTemp), "%02x", temp[i]); strcat(result,szTemp); } memcpy(sha,result,40); diff --git a/protocols/Xfire/src/iniupdater.cpp b/protocols/Xfire/src/iniupdater.cpp index cc835332a4..dd82e010e8 100644 --- a/protocols/Xfire/src/iniupdater.cpp +++ b/protocols/Xfire/src/iniupdater.cpp @@ -61,7 +61,7 @@ void UpdateMyXFireIni(LPVOID dummy) { strcat(file2,"xfire_games.ini");
strcat(file3,"xfire_games.old");
- sprintf_s(request,1024,"%s%d",INI_URLREQUEST,getfilesize(file2));
+ mir_snprintf(request,1024,"%s%d",INI_URLREQUEST,getfilesize(file2));
if(CheckWWWContent(request))
{
@@ -101,7 +101,7 @@ void UpdateMyIcons(LPVOID dummy) { strcat(file2,"icons.dll");
strcat(file3,"icons.old");
- sprintf_s(request,1024,"%s%d",ICO_URLREQUEST,getfilesize(file2));
+ mir_snprintf(request,1024,"%s%d",ICO_URLREQUEST,getfilesize(file2));
if(CheckWWWContent(request))
{
diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp index 17891ac6ec..f2d80d8d1e 100644 --- a/protocols/Xfire/src/main.cpp +++ b/protocols/Xfire/src/main.cpp @@ -491,7 +491,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) { char temp[255];
char * dummy;
ClanBuddyListNamesPacket *clan = (ClanBuddyListNamesPacket*)content;
- sprintf(temp,"Clan_%d",clan->clanid);
+ mir_snprintf(temp, SIZEOF(temp), "Clan_%d", clan->clanid);
DBVARIANT dbv;
if(!db_get(NULL,protocolname,temp,&dbv))
@@ -2389,7 +2389,7 @@ void gamedetectiont(LPVOID lparam) if(packet->ip[3]!=0)
{
- sprintf(temp,"%d.%d.%d.%d:%d",(unsigned char)packet->ip[3],(unsigned char)packet->ip[2],(unsigned char)packet->ip[1],(unsigned char)packet->ip[0],packet->port);
+ mir_snprintf(temp, SIZEOF(temp), "%d.%d.%d.%d:%d", (unsigned char)packet->ip[3], (unsigned char)packet->ip[2], (unsigned char)packet->ip[1], (unsigned char)packet->ip[0],packet->port);
db_set_s(NULL, protocolname, "VServerIP", temp);
db_set_s(NULL, protocolname, "currentvoicename", "Teamspeak");
}
@@ -2429,7 +2429,7 @@ void gamedetectiont(LPVOID lparam) db_set_w(NULL,protocolname,"currentvoice",vid);
- sprintf(temp,"%d.%d.%d.%d:%d",(unsigned char)packet->ip[3],(unsigned char)packet->ip[2],(unsigned char)packet->ip[1],(unsigned char)packet->ip[0],packet->port);
+ mir_snprintf(temp, SIZEOF(temp), "%d.%d.%d.%d:%d", (unsigned char)packet->ip[3], (unsigned char)packet->ip[2], (unsigned char)packet->ip[1],(unsigned char)packet->ip[0],packet->port);
db_set_s(NULL, protocolname, "VServerIP", temp);
if(myClient!=NULL)
@@ -2469,7 +2469,7 @@ void gamedetectiont(LPVOID lparam) packet->gameid=vid;
db_set_w(NULL,protocolname,"currentvoice",vid);
- sprintf(temp,"%d.%d.%d.%d:%d",(unsigned char)packet->ip[3],(unsigned char)packet->ip[2],(unsigned char)packet->ip[1],(unsigned char)packet->ip[0],packet->port);
+ mir_snprintf(temp, SIZEOF(temp), "%d.%d.%d.%d:%d", (unsigned char)packet->ip[3], (unsigned char)packet->ip[2], (unsigned char)packet->ip[1],(unsigned char)packet->ip[0],packet->port);
db_set_s(NULL, protocolname, "VServerIP", temp);
if(myClient!=NULL)
@@ -3586,7 +3586,7 @@ int IconLibChanged(WPARAM wParam, LPARAM lParam) { //ImageList_ReplaceIcon(hAdvancedStatusIcon,(int)icocache[i].handle,icocache[i].hicon);
HANDLE before=icocache[i].handle;
icocache[i].handle=(HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)icocache[i].hicon, 0);
- sprintf(temp,"before: %d after: %d",before,icocache[i].handle);
+ mir_snprintf(temp, SIZEOF(temp), "before: %d after: %d", before, icocache[i].handle);
MessageBoxA(NULL,temp,temp,0);
DrawIcon(GetDC(NULL),x,0,(HICON)CallService(MS_SKIN2_GETICONBYHANDLE,0,(LPARAM)icocache[i].handle));
x+=32;
diff --git a/protocols/Xfire/src/processbuddyinfo.cpp b/protocols/Xfire/src/processbuddyinfo.cpp index 32ac9d9808..b23d51b531 100644 --- a/protocols/Xfire/src/processbuddyinfo.cpp +++ b/protocols/Xfire/src/processbuddyinfo.cpp @@ -58,7 +58,7 @@ void ProcessBuddyInfo(xfirelib::BuddyInfoPacket *buddyinfo,HANDLE hcontact,char* strcat(filename,".gif");
type=PA_FORMAT_GIF;
- sprintf(temp,"/xfire/xf/images/avatars/gallery/default/%03d.gif",buddyinfo->avatarid);
+ mir_snprintf(temp, SIZEOF(temp), "/xfire/xf/images/avatars/gallery/default/%03d.gif", buddyinfo->avatarid);
dl=GetWWWContent("media.xfire.com",temp,filename,FALSE);
break;
@@ -67,7 +67,7 @@ void ProcessBuddyInfo(xfirelib::BuddyInfoPacket *buddyinfo,HANDLE hcontact,char* strcat(filename,".jpg");
type=PA_FORMAT_JPEG;
- sprintf(temp,"/avatar/100/%s.jpg?%d",username,buddyinfo->avatarid);
+ mir_snprintf(temp, SIZEOF(temp), "/avatar/100/%s.jpg?%d", username, buddyinfo->avatarid);
dl=GetWWWContent("screenshot.xfire.com",temp,filename,FALSE);
break;
@@ -75,7 +75,7 @@ void ProcessBuddyInfo(xfirelib::BuddyInfoPacket *buddyinfo,HANDLE hcontact,char* type=PA_FORMAT_GIF;
strcat(filename,"xfire.gif");
- sprintf(temp,"/xfire/xf/images/avatars/gallery/default/xfire.gif",buddyinfo->avatarid);
+ mir_snprintf(temp, SIZEOF(temp), "/xfire/xf/images/avatars/gallery/default/xfire.gif", buddyinfo->avatarid);
dl=GetWWWContent("media.xfire.com",temp,filename,TRUE);
break;
diff --git a/protocols/Xfire/src/tools.cpp b/protocols/Xfire/src/tools.cpp index 9cfbb44662..e662defe91 100644 --- a/protocols/Xfire/src/tools.cpp +++ b/protocols/Xfire/src/tools.cpp @@ -42,9 +42,9 @@ extern HANDLE hNetlib; for(int i=0;i<size;i++)
{
if(i%16==0&&i!=0)
- sprintf(buffer,"%s\n%02x ",buffer,buf[i]);
+ mir_snprintf(buffer, SIZEOF(buffer), "%s\n%02x ", buffer, buf[i]);
else
- sprintf(buffer,"%s%02x ",buffer,buf[i]);
+ mir_snprintf(buffer, SIZEOF(buffer), "%s%02x ", buffer, buf[i]);
}
return buffer;
diff --git a/protocols/Xfire/src/userdetails.cpp b/protocols/Xfire/src/userdetails.cpp index e571dedc6a..0873545bd2 100644 --- a/protocols/Xfire/src/userdetails.cpp +++ b/protocols/Xfire/src/userdetails.cpp @@ -68,7 +68,7 @@ void SetItemTxt(HWND hwndDlg,int feldid,char*feld,HANDLE hcontact,int type) if(type==1)
{
char temp[255];
- sprintf(temp,"%i",dbv.wVal);
+ mir_snprintf(temp, SIZEOF(temp), "%i", dbv.wVal);
SetDlgItemText(hwndDlg,feldid,temp);
}
else
@@ -98,7 +98,7 @@ static int GetIPPortUDetails(HANDLE wParam,char* feld1,char* feld2) if(db_get_s((HANDLE)wParam, protocolname, feld1,&dbv))
return 0;
- sprintf(temp,"%s:%d",dbv.pszVal,db_get_w((HANDLE)wParam, protocolname, feld2, -1));
+ mir_snprintf(temp, SIZEOF(temp), "%s:%d", dbv.pszVal, db_get_w((HANDLE)wParam, protocolname, feld2, -1));
db_free(&dbv);
@@ -390,30 +390,30 @@ static INT_PTR CALLBACK DlgProcUserDetails(HWND hwndDlg, UINT msg, WPARAM wParam char game[512]="";
if(!db_get(hContact,"ContactPhoto","File",&dbv))
{
- snprintf(img,256,"<img src=\"%s\">",dbv.pszVal);
+ mir_snprintf(img,256,"<img src=\"%s\">",dbv.pszVal);
db_free(&dbv);
}
if(!db_get(hContact,protocolname,"Username",&dbv))
{
- snprintf(username,256,"<b>Username:</b> %s<br>",dbv.pszVal);
+ mir_snprintf(username,256,"<b>Username:</b> %s<br>",dbv.pszVal);
db_free(&dbv);
}
if(!db_get(hContact,protocolname,"Nick",&dbv))
{
- snprintf(nick,256,"<b>Nick:</b> %s<br>",dbv.pszVal);
+ mir_snprintf(nick,256,"<b>Nick:</b> %s<br>",dbv.pszVal);
db_free(&dbv);
}
if(!db_get(hContact,protocolname,"XStatusMsg",&dbv))
{
- snprintf(status,256,"<b>Status:</b> %s<br>",dbv.pszVal);
+ mir_snprintf(status,256,"<b>Status:</b> %s<br>",dbv.pszVal);
db_free(&dbv);
}
if(!db_get(hContact,protocolname,"RGame",&dbv))
{
- snprintf(game,512,"<fieldset style='border:1px solid #0091d5;background-color:#0d2c3e;margin-bottom:8px;'><legend>Spiel</legend><table><tr><td valign=top style='font-family:Arial;font-size:11px;color:#fff;'><b><u>%s</u></b></td></tr></table></fieldset>",dbv.pszVal);
+ mir_snprintf(game,512,"<fieldset style='border:1px solid #0091d5;background-color:#0d2c3e;margin-bottom:8px;'><legend>Spiel</legend><table><tr><td valign=top style='font-family:Arial;font-size:11px;color:#fff;'><b><u>%s</u></b></td></tr></table></fieldset>",dbv.pszVal);
db_free(&dbv);
}
- snprintf(profil,2056,"mshtml:<div style='position:absolute;top:0;left:0;border:1px solid #0091d5;background-color:#000;padding:6px;width:334px;height:249px'><table><tr><td valign=top>%s</td><td valign=top style='font-family:Arial;font-size:11px;color:#fff;'>%s%s%s</td></tr><tr><td valign=top colspan=\"2\" style='font-family:Arial;font-size:11px;color:#fff;'>%s%s</td></tr></table></div>",img,username,nick,status,game);
+ mir_snprintf(profil,2056,"mshtml:<div style='position:absolute;top:0;left:0;border:1px solid #0091d5;background-color:#000;padding:6px;width:334px;height:249px'><table><tr><td valign=top>%s</td><td valign=top style='font-family:Arial;font-size:11px;color:#fff;'>%s%s%s</td></tr><tr><td valign=top colspan=\"2\" style='font-family:Arial;font-size:11px;color:#fff;'>%s%s</td></tr></table></div>",img,username,nick,status,game);
HWND hWnd = ::CreateWindow("AtlAxWin", profil,
WS_CHILD|WS_VISIBLE, 0, 0, 334, 249, hwndDlg, NULL,
::GetModuleHandle(NULL), NULL);
diff --git a/protocols/Xfire/src/variables.cpp b/protocols/Xfire/src/variables.cpp index 34c1dec6f2..f23a47966c 100644 --- a/protocols/Xfire/src/variables.cpp +++ b/protocols/Xfire/src/variables.cpp @@ -114,7 +114,7 @@ char* Varxfireserverip(ARGUMENTSINFO *ai) { DBVARIANT dbv3;
if(!db_get(ai->fi->hContact,protocolname, "ServerIP",&dbv3))
{
- sprintf(temp,"%s:%d",dbv3.pszVal,db_get_w(ai->fi->hContact,protocolname, "Port",0));
+ mir_snprintf(temp, SIZEOF(temp), "%s:%d", dbv3.pszVal, db_get_w(ai->fi->hContact, protocolname, "Port", 0));
db_free(&dbv3);
return mir_strdup(temp);
}
@@ -141,7 +141,7 @@ char* Varxfirevoiceip(ARGUMENTSINFO *ai) { DBVARIANT dbv3;
if(!db_get(ai->fi->hContact,protocolname, "VServerIP",&dbv3))
{
- sprintf(temp,"%s:%d",dbv3.pszVal,db_get_w(ai->fi->hContact,protocolname, "VPort",0));
+ mir_snprintf(temp, SIZEOF(temp), "%s:%d", dbv3.pszVal, db_get_w(ai->fi->hContact, protocolname, "VPort", 0));
db_free(&dbv3);
return mir_strdup(temp);
}
|