Skip to content

Commit

Permalink
Fixed bug 7217.
Browse files Browse the repository at this point in the history
--HG--
branch : 6.1
  • Loading branch information
lextm committed May 21, 2011
1 parent 2923ba9 commit 22e792e
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 65 deletions.
34 changes: 0 additions & 34 deletions Install/Install.wixproj

This file was deleted.

24 changes: 0 additions & 24 deletions Install/Product.wxs

This file was deleted.

4 changes: 2 additions & 2 deletions SharpSnmpLib/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("6.1.011114.16")]
[assembly: AssemblyVersion("6.1.010521.00")]
#if (!CF)
[assembly: AssemblyFileVersion("6.1.011114.16")]
[assembly: AssemblyFileVersion("6.1.010521.00")]
#endif
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: CLSCompliant(true)]
Expand Down
2 changes: 1 addition & 1 deletion SharpSnmpLib/ByteTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ internal static byte[] GetRawBytes(IEnumerable<byte> orig, bool negative)
// if sign bit is not correct, add an extra byte
if ((list[list.Count - 1] & 0x80) != sign)
{
list.Add(sign);
list.Add(flag);
}

list.Reverse();
Expand Down
4 changes: 2 additions & 2 deletions SharpSnmpLib/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("6.1.011114.16")]
[assembly: AssemblyVersion("6.1.010521.00")]
#if (!CF)
[assembly: AssemblyFileVersion("6.1.011114.16")]
[assembly: AssemblyFileVersion("6.1.010521.00")]
#endif
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: CLSCompliant(true)]
Expand Down
4 changes: 2 additions & 2 deletions SharpSnmpLib/Properties/AssemblyInfo.cs.bak
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("6.1.011114.16")]
[assembly: AssemblyVersion("6.1.010521.00")]
#if (!CF)
[assembly: AssemblyFileVersion("6.1.011114.16")]
[assembly: AssemblyFileVersion("6.1.010521.00")]
#endif
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: CLSCompliant(true)]
Expand Down
10 changes: 10 additions & 0 deletions Tests/Tests/TestByteTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ public void TestWriteLongLength()
ByteTool.WritePayloadLength(m, length);
Assert.AreEqual(expected, m.ToArray());
}

[Test]
public void TestNegative2()
{
// bug 7217 http://sharpsnmplib.codeplex.com/workitem/7217
Integer32 i = new Integer32(-250);
var result = DataFactory.CreateSnmpData(i.ToBytes());
Assert.AreEqual(SnmpType.Integer32, result.TypeCode);
Assert.AreEqual(-250, ((Integer32)result).ToInt32());
}
}
}
#pragma warning restore 1591, 0618

0 comments on commit 22e792e

Please sign in to comment.