Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit ac01e27

Browse files
authored
1 parent ff899f8 commit ac01e27

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/mscorlib/src/System/String.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1703,6 +1703,8 @@ private static unsafe int wcslen(char *ptr)
17031703
Contract.Assert(end[0] == 0 || end[1] == 0);
17041704
if (end[0] != 0) end++;
17051705
#else // !BIT64
1706+
// Based on https://graphics.stanford.edu/~seander/bithacks.html#ZeroInWord
1707+
17061708
// 64-bit implementation: process 1 ulong (word) at a time
17071709

17081710
// What we do here is add 0x7fff from each of the

0 commit comments

Comments
 (0)