Browse Source

Fix IPv6 endianness

adaptive-webui-19844
FranciscoPombal 5 years ago
parent
commit
9f045500d1
  1. 4
      src/base/bittorrent/tracker.cpp

4
src/base/bittorrent/tracker.cpp

@ -107,8 +107,8 @@ namespace
case QAbstractSocket::IPv6Protocol: { case QAbstractSocket::IPv6Protocol: {
const Q_IPV6ADDR ipv6 = addr.toIPv6Address(); const Q_IPV6ADDR ipv6 = addr.toIPv6Address();
QByteArray ret; QByteArray ret;
for (int i = (sizeof(ipv6.c) - 1); i >= 0; --i) for (const quint8 i : ipv6.c)
ret.append(static_cast<char>(ipv6.c[i])); ret.append(i);
return ret; return ret;
} }

Loading…
Cancel
Save