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

Fix infinite loop in Append(object value) #10

Merged
merged 2 commits into from
May 28, 2018
Merged

Fix infinite loop in Append(object value) #10

merged 2 commits into from
May 28, 2018

Conversation

ishvedov
Copy link
Contributor

Description

Fix infinite loop in Append(object value)

Motivation and Context

How Has This Been Tested?

Screenshots

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Signed-off-by: ishvedov ivan.shvedov@gmail.com

@nfbot
Copy link
Member

nfbot commented May 28, 2018

Hi @ishvedov,

I'm nanoFramework bot.
Thank you for your contribution!

A human will be reviewing it shortly. 😉

@CLAassistant
Copy link

CLAassistant commented May 28, 2018

CLA assistant check
All committers have signed the CLA.

@josesimoes
Copy link
Member

Nice catch! 👏 💯

@@ -364,7 +364,7 @@ public StringBuilder Append(long value)
/// <returns>A reference to this instance after the append operation has completed.</returns>
public StringBuilder Append(object value)
{
return value == null ? this : Append(value);
return Append(value.ToString());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The check for null is still required, otherwise the ToString() would fail.

Check here the code from the full framework.

Please follow.

Copy link
Member

@josesimoes josesimoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@josesimoes josesimoes merged commit 715a324 into nanoframework:develop May 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants