[Mono-bugs] [Bug 605340] Unexpected exception on calling String.LastIndexOf on empty strings with startIndex=-1

2010-11-09 Thread bugzilla_noreply

https://bugzilla.novell.com/show_bug.cgi?id=605340

https://bugzilla.novell.com/show_bug.cgi?id=605340#c4


Rodrigo Kumpera rkump...@novell.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||rkump...@novell.com
 Resolution||FIXED

--- Comment #4 from Rodrigo Kumpera rkump...@novell.com 2010-11-09 15:42:04 
UTC ---
Fixed on trunk the general case.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the QA contact for the bug.
___
mono-bugs maillist  -  mono-bugs@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-bugs


[Mono-bugs] [Bug 605340] Unexpected exception on calling String.LastIndexOf on empty strings with startIndex=-1

2010-07-17 Thread bugzilla_noreply
http://bugzilla.novell.com/show_bug.cgi?id=605340

http://bugzilla.novell.com/show_bug.cgi?id=605340#c3


--- Comment #3 from Matthew Smit zap...@hotmail.com 2010-07-17 23:25:20 UTC 
---
Created an attachment (id=376611)
 -- (http://bugzilla.novell.com/attachment.cgi?id=376611)
Patch for LastIndexOf where length is 0

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the QA contact for the bug.
___
mono-bugs maillist  -  mono-bugs@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-bugs


[Mono-bugs] [Bug 605340] Unexpected exception on calling String.LastIndexOf on empty strings with startIndex=-1

2010-07-09 Thread bugzilla_noreply
http://bugzilla.novell.com/show_bug.cgi?id=605340

http://bugzilla.novell.com/show_bug.cgi?id=605340#c2


Gonzalo Paniagua Javier gonz...@novell.com changed:

   What|Removed |Added

 AssignedTo|mono-bugs@lists.ximian.com  |gonz...@novell.com

--- Comment #2 from Gonzalo Paniagua Javier gonz...@novell.com 2010-07-09 
20:40:50 UTC ---
Would you mind attaching a patch in 'diff -u' format?
Thanks.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the QA contact for the bug.
You are the assignee for the bug.
___
mono-bugs maillist  -  mono-bugs@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-bugs


[Mono-bugs] [Bug 605340] Unexpected exception on calling String.LastIndexOf on empty strings with startIndex=-1

2010-07-02 Thread bugzilla_noreply
http://bugzilla.novell.com/show_bug.cgi?id=605340

http://bugzilla.novell.com/show_bug.cgi?id=605340#c1


--- Comment #1 from Matthew Smit zap...@hotmail.com 2010-07-03 00:37:17 UTC 
---
This should do it. Haven't had a chance to fully run tests on it yet.

Index:
String.cs===
--- String.cs(revision 158670)
+++ String.cs(working copy)  
public int LastIndexOf (string value, StringComparison comparisonType)
{
if (this.Length == 0)
-return value == String.Empty ? 0 : -1;
+return value == -1;
else
return LastIndexOf (value, this.Length - 1, this.Length,
comparisonType);
}

public int LastIndexOf (char value, int startIndex, int count)
{
-if (startIndex == 0  this.length == 0)
+if (this.length == 0)
return -1;

// = for char ( for string)
if ((startIndex  0) || (startIndex = this.Length))
throw new ArgumentOutOfRangeException (startIndex,  0 || =
this.Length);
if ((count  0) || (count  this.Length))
throw new ArgumentOutOfRangeException (count,  0 || 
this.Length);
if (startIndex - count + 1  0)
throw new ArgumentOutOfRangeException (startIndex - count + 1 
0);

return LastIndexOfUnchecked (value, startIndex, count);
}

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the QA contact for the bug.
You are the assignee for the bug.
___
mono-bugs maillist  -  mono-bugs@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-bugs


[Mono-bugs] [Bug 605340] Unexpected exception on calling String.LastIndexOf on empty strings with startIndex=-1

2010-05-16 Thread bugzilla_noreply
http://bugzilla.novell.com/show_bug.cgi?id=605340

http://bugzilla.novell.com/show_bug.cgi?id=605340#c


Gonzalo Paniagua Javier gonz...@novell.com changed:

   What|Removed |Added

 CC||gonz...@novell.com

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the QA contact for the bug.
You are the assignee for the bug.
___
mono-bugs maillist  -  mono-bugs@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-bugs