View | Details | Raw Unified | Return to bug 31635
Collapse All | Expand All

(-)a/mcs/class/Mono.Posix/Mono.Unix/UnixMarshal.cs (+4 lines)
Lines 176-181 namespace Mono.Unix { Link Here
176
			else if (typeof(UnicodeEncoding).IsAssignableFrom (encodingType)) {
176
			else if (typeof(UnicodeEncoding).IsAssignableFrom (encodingType)) {
177
				len = GetInt16BufferLength (p);
177
				len = GetInt16BufferLength (p);
178
			}
178
			}
179
			// Encodings that will always end with a 0x00000000 32-bit word
180
			else if (typeof(UTF32Encoding).IsAssignableFrom (encodingType)) {
181
				len = GetInt32BufferLength (p);
182
			}
179
			// Some non-public encoding, such as Latin1 or a DBCS charset.
183
			// Some non-public encoding, such as Latin1 or a DBCS charset.
180
			// Look for a sequence of encoding.GetMaxByteCount() bytes that are all
184
			// Look for a sequence of encoding.GetMaxByteCount() bytes that are all
181
			// 0, which should be the terminating null.
185
			// 0, which should be the terminating null.

Return to bug 31635