+2010-07-05 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+ * TimeSpan.cs: two consecutive colons produce an error now.
+ Fixes bug #598467.
+
2010-06-29 Sebastien Pouliot <sebastien@ximian.com>
* Attribute.cs: Fix GetHashCode to match MS behavior (needed for
value1 = ParseInt (false);
if (!ParseOptDaysSeparator ()) // Parse either day separator or colon
ParseColon (false);
+ int p = _cur;
value2 = ParseInt (true);
- ParseColon (true);
- value3 = ParseInt (true);
- ParseColon (true);
- value4 = ParseInt (true);
+ value3 = value4 = 0;
+ if (p < _cur) {
+ ParseColon (true);
+ value3 = ParseInt (true);
+ ParseColon (true);
+ value4 = ParseInt (true);
+ }
// We know the precise separator for ticks, so there's no need to guess.
if (ParseOptDecimalSeparator ())
days = 0;
}
ParseColon(false);
+ int p = _cur;
minutes = ParseInt (true);
- ParseColon (true);
- seconds = ParseInt (true);
+ seconds = 0;
+ if (p < _cur) {
+ ParseColon (true);
+ seconds = ParseInt (true);
+ }
if ( ParseOptDot () ) {
ticks = ParseTicks ();