mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-07 10:42:31 +00:00
* Moved some stuff from Content into FileList.
* Resume data was not being used as it was comparing the number of entries with size_bytes, not size_files. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@812 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -54,9 +54,7 @@ VariableAny::set(const torrent::Object& arg) {
|
||||
|
||||
void
|
||||
VariableValue::set(const torrent::Object& arg) {
|
||||
uint64_t value;
|
||||
const char* first;
|
||||
char* last;
|
||||
int64_t value;
|
||||
|
||||
switch (arg.type()) {
|
||||
case torrent::Object::TYPE_NONE:
|
||||
@@ -68,11 +66,7 @@ VariableValue::set(const torrent::Object& arg) {
|
||||
break;
|
||||
|
||||
case torrent::Object::TYPE_STRING:
|
||||
first = arg.as_string().c_str();
|
||||
value = strtoll(first, &last, 0);
|
||||
|
||||
if (last == first || *last != '\0')
|
||||
throw torrent::input_error("Could not convert string to value.");
|
||||
string_to_value_unit(arg.as_string().c_str(), &value, 0, 1);
|
||||
|
||||
m_variable = value;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user