We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13c188d commit 8170a2fCopy full SHA for 8170a2f
1 file changed
src/main/java/org/purejava/windows/MemoryAllocator.java
@@ -8,7 +8,8 @@ public static MemorySegment ALLOCATE_FOR(String str) {
8
return RuntimeHelper.CONSTANT_ALLOCATOR.allocateUtf8String(str);
9
}
10
11
- public static MemorySegment ALLOCATE_FOR_WCHAR_T(String str) {
+ public static MemorySegment ALLOCATE_WCHAR_T_FOR(String str) {
12
+ str += "\0"; // The \0 character marks the end of the string stored in a char array
13
return RuntimeHelper.CONSTANT_ALLOCATOR.allocateArray(ValueLayout.JAVA_CHAR, str.toCharArray());
14
15
0 commit comments