Author: kostat
Date: 2007-01-15 02:39:23 -0500 (Mon, 15 Jan 2007)
New Revision: 71004
Modified:
trunk/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlCommand.cs
Log:
avoid bad indexing
Modified: trunk/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlCommand.cs
===================================================================
--- trunk/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlCommand.cs
2007-01-15 07:27:16 UTC (rev 71003)
+++ trunk/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlCommand.cs
2007-01-15 07:39:23 UTC (rev 71004)
@@ -91,7 +91,7 @@
return commandText;
string trimmedCommandText = commandText.TrimEnd
();
- if (commandText [0] != '[' &&
trimmedCommandText [trimmedCommandText.Length - 1] != ')')
+ if (commandText [0] != '[' &&
trimmedCommandText.Length > 0 && trimmedCommandText [trimmedCommandText.Length
- 1] != ')')
commandText = String.Concat ("[",
commandText, "]");
return commandText;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches