mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-15 14:42:30 +00:00
* 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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user