mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8289570: SegmentAllocator:allocateUtf8String(String str) default behavior mismatch to spec
Reviewed-by: alanb, psandoz
This commit is contained in:
parent
20124ac755
commit
8e01ffb3a7
2 changed files with 20 additions and 1 deletions
|
@ -146,7 +146,7 @@ public final class Utils {
|
|||
}
|
||||
|
||||
public static MemorySegment toCString(byte[] bytes, SegmentAllocator allocator) {
|
||||
MemorySegment addr = allocator.allocate(bytes.length + 1, 1L);
|
||||
MemorySegment addr = allocator.allocate(bytes.length + 1);
|
||||
copy(addr, bytes);
|
||||
return addr;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue