diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-02-28 11:05:09 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-02-28 11:05:09 +0000 |
commit | b1530a48bd67d19f6a18355e04a884b36c696e8b (patch) | |
tree | 539cc8c4387b586658898a146b8876cc133f8783 /plugins/TipperYM/src/translations.cpp | |
parent | 4e2a8eb11a9a4286eb0bcb3386bab58e87ae4b69 (diff) |
Tipper:
- minor bugfixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@12284 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TipperYM/src/translations.cpp')
-rw-r--r-- | plugins/TipperYM/src/translations.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/TipperYM/src/translations.cpp b/plugins/TipperYM/src/translations.cpp index a6d13cc0d1..85a0473c92 100644 --- a/plugins/TipperYM/src/translations.cpp +++ b/plugins/TipperYM/src/translations.cpp @@ -28,14 +28,16 @@ HANDLE hServiceAdd; void AddTranslation(DBVTranslation *newTrans)
{
+ DBVTranslation *ptranslations = (DBVTranslation *)mir_realloc(translations, sizeof(DBVTranslation) * (iTransFuncsCount+1));
+ if (ptranslations == NULL)
+ return;
+ translations = ptranslations;
iTransFuncsCount++;
-
- translations = (DBVTranslation *)mir_realloc(translations, sizeof(DBVTranslation) * iTransFuncsCount);
translations[iTransFuncsCount - 1] = *newTrans;
char *szName = mir_t2a(newTrans->swzName);
- char szSetting[256] = "Trans_";
- strcat(szSetting, szName);
+ char szSetting[256];
+ mir_snprintf(szSetting, sizeof(szSetting),"Trans_%s",szName);
if (_tcscmp(newTrans->swzName, _T("[No translation]")) == 0)
{
|