Skip to content
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

Potential bug in HelperFUnctions::IsSameFile() #13

Closed
Wayne-Mather opened this issue Feb 5, 2016 · 4 comments
Closed

Potential bug in HelperFUnctions::IsSameFile() #13

Wayne-Mather opened this issue Feb 5, 2016 · 4 comments

Comments

@Wayne-Mather
Copy link

On line 641 of internal static bool IsSameFile(Stream streamOne, Stream streamTwo)

            if (streamOne.Length != streamOne.Length)
            {
                // Return false to indicate files are different
                return false;
            }

Is there any reason to check if the length of the same stream does not match? Should not one of those be streamTwo?

PrzemyslawKlys pushed a commit that referenced this issue Feb 6, 2016
@PrzemyslawKlys
Copy link
Contributor

Fixed. Thank you.

@Wayne-Mather
Copy link
Author

No Problems. Looks like there maybe a few more from me as the unit tests are not right due to the use bool? data types

From
Assert.IsTrue(boldTextFormatting.Bold);

To
Assert.IsTrue(boldTextFormatting.Bold.HasValue && boldTextFormatting.Bold.Value);

@PrzemyslawKlys
Copy link
Contributor

Yes. fitdev added some changes recently and it fails on UnitTests due to change bool to bool?

@PrzemyslawKlys
Copy link
Contributor

fixed according to your suggestion. Thank you again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants