* Fixed a potential leak in scgi_task.cc.

* Removed std:: from snprintf in window_file_list.cc.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1052 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2008-04-15 11:50:14 +00:00
parent 41088740bd
commit 12b43d78a3
3 changed files with 20 additions and 13 deletions
+3 -3
View File
@@ -36,7 +36,7 @@
#include "config.h"
#include <cstdio>
#include <stdio.h>
#include <torrent/path.h>
#include <torrent/data/file.h>
#include <torrent/data/file_list.h>
@@ -164,8 +164,8 @@ WindowFileList::redraw() {
int first = 16 + std::min<unsigned int>(itr.depth(), 8);
int last = std::max<unsigned int>(m_canvas->width() + 1, 16 + 12);
std::snprintf(buffer + first, last - first, "| %s",
itr.depth() < (*itr)->path()->size() ? (*itr)->path()->at(itr.depth()).c_str() : "UNKNOWN");
snprintf(buffer + first, last - first, "| %s",
itr.depth() < (*itr)->path()->size() ? (*itr)->path()->at(itr.depth()).c_str() : "UNKNOWN");
m_canvas->print_attributes(0, pos, buffer, buffer + std::strlen(buffer), &attributes);