diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-19 19:35:42 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-19 19:35:42 +0000 |
commit | 4c814798c7bc7f6a0f92c21b027b26290622aa2f (patch) | |
tree | 9bbfb38bd639f352300aa16ff7c45f5a9b2dba6d /protocols/Xfire/src/Xfire_game.cpp | |
parent | f0f0cd088f1ec3a85abee825ddbc214f3f6b92c3 (diff) |
SIZEOF replaced with more secure analog - _countof
git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Xfire/src/Xfire_game.cpp')
-rw-r--r-- | protocols/Xfire/src/Xfire_game.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/Xfire/src/Xfire_game.cpp b/protocols/Xfire/src/Xfire_game.cpp index 87c0a4d2b9..02e16a955a 100644 --- a/protocols/Xfire/src/Xfire_game.cpp +++ b/protocols/Xfire/src/Xfire_game.cpp @@ -57,7 +57,7 @@ BOOL Xfire_game::start_game(char*ip, unsigned int port, char*pw) { //port begrenzen
port = port % 65535;
//port in string wandeln
- mir_snprintf(portstr, SIZEOF(portstr), "%d", port);
+ mir_snprintf(portstr, _countof(portstr), "%d", port);
str_replace(mynetworkparams, "%UA_GAME_HOST_NAME%", ip);
str_replace(mynetworkparams, "%UA_GAME_HOST_PORT%", portstr);
@@ -192,11 +192,11 @@ BOOL Xfire_game::checkpath(PROCESSENTRY32* processInfo) TCHAR fpath[MAX_PATH] = _T("");
//lese den pfad des spiels aus
- GetModuleFileNameEx(op, NULL, fpath, SIZEOF(fpath));
+ GetModuleFileNameEx(op, NULL, fpath, _countof(fpath));
//8.3 pfade umwandeln, nur wenn sich eine tilde im string befindet
if (_tcschr(fpath, '~'))
- GetLongPathName(fpath, fpath, SIZEOF(fpath));
+ GetLongPathName(fpath, fpath, _countof(fpath));
//alles in kelinbuchstaben umwandeln
this->strtolowerT(fpath);
@@ -440,7 +440,7 @@ void Xfire_game::createMenuitem(unsigned int pos, int dbid) mi.pszPopupName = Translate("Start game");
mi.pszContactOwner = protocolname;
- mir_snprintf(temp, SIZEOF(temp), servicefunction, this->id);
+ mir_snprintf(temp, _countof(temp), servicefunction, this->id);
//wenn die servicefunktion schon exisitert vernichten, hehe
if (ServiceExists(temp))
DestroyServiceFunction(temp);
|