* Added TextElementValue*.

* The curl perform loop wasn't properly checking the returned pointer,
which caused a segfault with libcurl 7.15.5.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@754 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-08-10 21:24:10 +00:00
parent ca58b43d8b
commit 3c634730c4
13 changed files with 340 additions and 34 deletions
+7
View File
@@ -38,6 +38,7 @@
#include <algorithm>
#include <rak/functional.h>
#include <torrent/exceptions.h>
#include "text_element_list.h"
@@ -59,8 +60,14 @@ TextElementList::print(char* first, const char* last, Canvas::attributes_list* a
if (column-- > 0) {
const char* columnEnd = std::min<const char*>(last, first + *m_columnWidth);
if (columnEnd < first || columnEnd > last)
throw torrent::client_error("TextElementList::print(...) columnEnd < first || columnEnd > last.");
first = (*itr)->print(first, columnEnd, attributes, object);
if (first > columnEnd)
throw torrent::client_error("TextElementList::print(...) first > columnEnd.");
std::memset(first, ' ', columnEnd - first);
first += columnEnd - first;