summaryrefslogtreecommitdiff
path: root/plugins/Db_autobackups/src/backup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Db_autobackups/src/backup.cpp')
-rw-r--r--plugins/Db_autobackups/src/backup.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/Db_autobackups/src/backup.cpp b/plugins/Db_autobackups/src/backup.cpp
index 702c29132d..48044887e4 100644
--- a/plugins/Db_autobackups/src/backup.cpp
+++ b/plugins/Db_autobackups/src/backup.cpp
@@ -327,10 +327,10 @@ int Backup(TCHAR *backup_filename)
if (dest_file_len > 50) {
size_t i;
+ puText = (TCHAR*)mir_alloc(sizeof(TCHAR) * (dest_file_len + 2));
for (i = (dest_file_len - 1); dest_file[i] != _T('\\'); i--)
;
//_tcsncpy_s(dest_file, backup_filename, _TRUNCATE);
-
mir_tstrncpy(puText, dest_file, (i + 2));
mir_tstrcat(puText, _T("\n"));
mir_tstrcat(puText, (dest_file + i + 1));