-
-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MonoTorrent is unable to transmit files >2GB #657
Comments
FYI, the abovementioned commit 08893f7 has a couple of critical bugs in using System;
namespace MonoTorrent
{
static class IntMath
{
public static long PowUnchecked (long value, int power)
{
if (power < 0)
throw new ArgumentOutOfRangeException (nameof (power), "Power must be greater than or equal to zero");
if (power == 0)
return 1;
return (power & 1) == 0
? PowUnchecked (value * value, power >> 1)
: value * PowUnchecked (value, power - 1);
}
public static long Pow (long value, int power)
{
if (power < 0)
throw new ArgumentOutOfRangeException (nameof (power), "Power must be greater than or equal to zero");
if (power == 0)
return 1;
return checked((power & 1) == 0
? Pow (value * value, power >> 1)
: value * Pow (value, power - 1));
}
public static int Pow (int value, int power)
{
if (power < 0)
throw new ArgumentOutOfRangeException (nameof (power), "Power must be greater than or equal to zero");
if (power == 0)
return 1;
return checked((power & 1) == 0
? Pow (value * value, power >> 1)
: value * Pow (value, power - 1));
}
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
plz see pull request #656 for an end-to-end integration test
The first issue I am hitting is inability to create a v2 torrent (did not test v1) that would include such a file due to
ArgumentOutOfRangeException
:I have my own fork where I replaced a few
int
s and floating point math withlong
s: lostmsu@08893f7 , but even with that fix for some reason creating a torrent succeeds, but when attempting to seed >2GB files fail hash check.The text was updated successfully, but these errors were encountered: