瀏覽代碼

2002-04-30 Dietmar Maurer <[email protected]>

	* string-icalls.c (ves_icall_System_String_InternalReplace_Str):
	fix bug 24041

svn path=/trunk/mono/; revision=4167
Dietmar Maurer 24 年之前
父節點
當前提交
206fe12e23
共有 2 個文件被更改,包括 6 次插入1 次删除
  1. 5 0
      mono/metadata/ChangeLog
  2. 1 1
      mono/metadata/string-icalls.c

+ 5 - 0
mono/metadata/ChangeLog

@@ -1,3 +1,8 @@
+2002-04-30  Dietmar Maurer  <[email protected]>
+
+	* string-icalls.c (ves_icall_System_String_InternalReplace_Str):
+	fix bug 24041
+
 2002-04-30  Dick Porter  <[email protected]>
 
 	* socket-io.c: Cope with SOCKET being an integer rather than a

+ 1 - 1
mono/metadata/string-icalls.c

@@ -288,7 +288,7 @@ ves_icall_System_String_InternalReplace_Str (MonoString *me, MonoString *oldValu
 	srclen = mono_string_length(me);
 
 	if (oldstrlen != newstrlen) {
-		for (i = 0; i != srclen - oldstrlen + 1; i++)
+		for (i = 0; i < srclen - oldstrlen; i++)
 			if (0 == memcmp(src + i, oldstr, oldstrlen * sizeof(gunichar2)))
 				occurr++;