diff options
author | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2010-07-05 22:21:56 +0400 |
---|---|---|
committer | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2010-07-05 22:21:56 +0400 |
commit | 6174f1d4dee972d4d811770f96a25cc63ffa45dc (patch) | |
tree | 22fc36398620763c90bf757982a8ff34f483f654 /mcs/class | |
parent | c0df7617c0f6b68db4fb22cb844ee06129116fa3 (diff) |
2010-07-05 Gonzalo Paniagua Javier <gonzalo@novell.com>
* TimeSpan.cs: two consecutive colons produce an error now.
Fixes bug #598467.
svn path=/branches/mono-2-6/mcs/; revision=159918
Diffstat (limited to 'mcs/class')
-rw-r--r-- | mcs/class/corlib/System/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/corlib/System/TimeSpan.cs | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/mcs/class/corlib/System/ChangeLog b/mcs/class/corlib/System/ChangeLog index 24e84a89cd8..2f7a4448d3f 100644 --- a/mcs/class/corlib/System/ChangeLog +++ b/mcs/class/corlib/System/ChangeLog @@ -1,3 +1,8 @@ +2010-07-05 Gonzalo Paniagua Javier <gonzalo@novell.com> + + * TimeSpan.cs: two consecutive colons produce an error now. + Fixes bug #598467. + 2010-06-08 Jonathan Pryor <jpryor@novell.com> * String.cs: Fix String.Split(String[],int,StringSplitOptions) so that: diff --git a/mcs/class/corlib/System/TimeSpan.cs b/mcs/class/corlib/System/TimeSpan.cs index 02243e7fc7f..42dc4a99519 100644 --- a/mcs/class/corlib/System/TimeSpan.cs +++ b/mcs/class/corlib/System/TimeSpan.cs @@ -595,9 +595,13 @@ namespace System days = 0; } ParseOptColon(); + int p = _cur; minutes = ParseInt (true); - ParseOptColon (); - seconds = ParseInt (true); + seconds = 0; + if (p < _cur) { + ParseOptColon (); + seconds = ParseInt (true); + } if ( ParseOptDot () ) { ticks = ParseTicks (); } |