Skip to content
Snippets Groups Projects
Commit 2868f70f authored by Stepan Sindelar's avatar Stepan Sindelar
Browse files

[GR-2798] Fix managed RFFI implementation of mkdtemp.

PullRequest: fastr/1418
parents c0892bb8 efd7c117
No related branches found
No related tags found
No related merge requests found
......@@ -144,7 +144,7 @@ public final class Managed_DownCallNodeFactory extends DownCallNodeFactory {
@TruffleBoundary
public Object execute(VirtualFrame frame) {
NativeCharArray templateBytes = (NativeCharArray) ForeignAccess.getArguments(frame).get(0);
String template = new String(templateBytes.getValue(), 0, templateBytes.getValue().length - 1);
String template = templateBytes.getString();
if (!template.endsWith("XXXXXX")) {
throw new IllegalArgumentException("template must end with XXXXXX");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment