mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
- Fixed IP filter file parsing on 64bits architecture (Fix by Eric Porter)
This commit is contained in:
parent
9a314db530
commit
00d9f7c36b
1 changed files with 4 additions and 4 deletions
|
@ -191,9 +191,9 @@ class FilterParserThread : public QThread {
|
||||||
if(IPv4) {
|
if(IPv4) {
|
||||||
//IPv4 addresses
|
//IPv4 addresses
|
||||||
IP = strStartIP.split('.');
|
IP = strStartIP.split('.');
|
||||||
address_v4 start((IP.at(0).toInt() << 24) + (IP.at(1).toInt() << 16) + (IP.at(2).toInt() << 8) + IP.at(3).toInt());
|
address_v4 start((IP.at(0).toUInt() << 24) + (IP.at(1).toUInt() << 16) + (IP.at(2).toUInt() << 8) + IP.at(3).toUInt());
|
||||||
IP = strEndIP.split('.');
|
IP = strEndIP.split('.');
|
||||||
address_v4 last((IP.at(0).toInt() << 24) + (IP.at(1).toInt() << 16) + (IP.at(2).toInt() << 8) + IP.at(3).toInt());
|
address_v4 last((IP.at(0).toUInt() << 24) + (IP.at(1).toUInt() << 16) + (IP.at(2).toUInt() << 8) + IP.at(3).toUInt());
|
||||||
// Apply to bittorrent session
|
// Apply to bittorrent session
|
||||||
filter.add_rule(start, last, ip_filter::blocked);
|
filter.add_rule(start, last, ip_filter::blocked);
|
||||||
} else {
|
} else {
|
||||||
|
@ -250,9 +250,9 @@ class FilterParserThread : public QThread {
|
||||||
if(strStartIP.contains(is_ipv4) && strEndIP.contains(is_ipv4)) {
|
if(strStartIP.contains(is_ipv4) && strEndIP.contains(is_ipv4)) {
|
||||||
// IPv4
|
// IPv4
|
||||||
IP = strStartIP.split('.');
|
IP = strStartIP.split('.');
|
||||||
address_v4 start((IP.at(0).toInt() << 24) + (IP.at(1).toInt() << 16) + (IP.at(2).toInt() << 8) + IP.at(3).toInt());
|
address_v4 start((IP.at(0).toUInt() << 24) + (IP.at(1).toUInt() << 16) + (IP.at(2).toUInt() << 8) + IP.at(3).toUInt());
|
||||||
IP = strEndIP.split('.');
|
IP = strEndIP.split('.');
|
||||||
address_v4 last((IP.at(0).toInt() << 24) + (IP.at(1).toInt() << 16) + (IP.at(2).toInt() << 8) + IP.at(3).toInt());
|
address_v4 last((IP.at(0).toUInt() << 24) + (IP.at(1).toUInt() << 16) + (IP.at(2).toUInt() << 8) + IP.at(3).toUInt());
|
||||||
// Apply to bittorrent session
|
// Apply to bittorrent session
|
||||||
filter.add_rule(start, last, ip_filter::blocked);
|
filter.add_rule(start, last, ip_filter::blocked);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue