[Mono-bugs] [Bug 58973][Min] New - string-to-double parsing confused by trailing "\0"

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 24 May 2004 17:16:22 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by s001@hotbox.ru.

http://bugzilla.ximian.com/show_bug.cgi?id=58973

--- shadow/58973	2004-05-24 17:16:22.000000000 -0400
+++ shadow/58973.tmp.11282	2004-05-24 17:16:22.000000000 -0400
@@ -0,0 +1,49 @@
+Bug#: 58973
+Product: Mono: Runtime
+Version: unspecified
+OS: GNU/Linux [Other]
+OS Details: x86 linux 2.6.5, gcc 3.3.1
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: s001@hotbox.ru               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: string-to-double parsing confused by trailing "\0"
+
+Description of Problem:
+ Parsing of string to float (double) value fails if
+the string contains trailing \0.
+
+Steps to reproduce the problem:
+ Compile and run this example:
+==============================
+using System;
+class App {
+    public static int Main(String[] args) {
+	System.Console.WriteLine(System.Double.Parse("1.0\0"));
+	return 0;
+    }
+
+}
+==============================
+
+Actual Results:
+ On mono beta 1 the output is:
+ Unhandled Exception: System.FormatException: Unknown char:
+
+Expected Results:
+ On MS .net the output is: 
+ 1
+
+How often does this happen? 
+ Always
+
+Additional Information:
+ Just some slight mono-vs-MS incompatability, though might 
+ cause specific applications to fail actually.