Overview
Comment: | OFStdIOStream_Win32Console: Add explicit casts |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
9ad332a3eaa5a2e460b82922de5daf42 |
User & Date: | js on 2016-05-28 14:22:12 |
Other Links: | manifest | tags |
Context
2016-05-28
| ||
14:56 | OFKernelEventObserver_select: Cast to of_socket_t check-in: e74fc30f5b user: js tags: trunk | |
14:22 | OFStdIOStream_Win32Console: Add explicit casts check-in: 9ad332a3ea user: js tags: trunk | |
13:18 | OFProcess: Improve environment handling on Win32 check-in: 0c7c53dd58 user: js tags: trunk | |
Changes
Modified src/OFStdIOStream_Win32Console.m from [856da3e285] to [64a809a602].
︙ | |||
104 105 106 107 108 109 110 111 112 113 114 115 116 117 | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | + + + - + + | length: (size_t)length { void *pool = objc_autoreleasePoolPush(); char *buffer = buffer_; of_char16_t *UTF16; size_t j = 0; if (length > sizeof(UINT32_MAX)) @throw [OFOutOfRangeException exception]; UTF16 = [self allocMemoryWithSize: sizeof(of_char16_t) count: length]; @try { DWORD UTF16Len; OFDataArray *rest = nil; size_t i = 0; |
︙ | |||
222 223 224 225 226 227 228 | 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | - - + + | if (length > SIZE_MAX / 2) @throw [OFOutOfRangeException exception]; if (_incompleteUTF8SurrogateLen > 0) { of_unichar_t c; of_char16_t UTF16[2]; ssize_t UTF8Len; |
︙ | |||
309 310 311 312 313 314 315 | 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | + + + - + | tmp[j++] = 0xDC00 | (c & 0x3FF); } else tmp[j++] = c; i += UTF8Len; } if (j > UINT32_MAX) @throw [OFOutOfRangeException exception]; |