@@ -2509,12 +2509,12 @@ free(buffer); @throw e; } return [OFData dataWithItemsNoCopy: buffer - itemSize: sizeof(of_unichar_t) count: length + itemSize: sizeof(of_unichar_t) freeWhenDone: true].items; } - (const of_char16_t *)UTF16String { @@ -2567,12 +2567,12 @@ } objc_autoreleasePoolPop(pool); return [OFData dataWithItemsNoCopy: buffer - itemSize: sizeof(of_char16_t) count: j + 1 + itemSize: sizeof(of_char16_t) freeWhenDone: true].items; } - (size_t)UTF16StringLength { @@ -2611,12 +2611,12 @@ if (byteOrder != OF_BYTE_ORDER_NATIVE) for (size_t i = 0; i < length; i++) buffer[i] = OF_BSWAP32(buffer[i]); return [OFData dataWithItemsNoCopy: buffer - itemSize: sizeof(of_char32_t) count: length + 1 + itemSize: sizeof(of_char32_t) freeWhenDone: true].items; } - (OFData *)dataWithEncoding: (of_string_encoding_t)encoding {