Skip to content

Commit

Permalink
Fix captured state for errno
Browse files Browse the repository at this point in the history
  • Loading branch information
DigitalSmile committed Aug 4, 2024
1 parent 4e8bbc2 commit 50c2082
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public String compose(String packageName, String originalName, List<FunctionNode

if (options.useErrno()) {
methodBody.addStatement("var capturedState = context.allocate(CAPTURED_STATE_LAYOUT)");
methodBody.addStatement("var callResult = (int) $T.$L.invoke($L)", context, nativeFunctionNames.get(functionNode), CodeBlock.join(arguments, ", "));
methodBody.addStatement("var callResult = (int) $T.$L.invoke(capturedState, $L)", context, nativeFunctionNames.get(functionNode), CodeBlock.join(arguments, ", "));
methodBody.addStatement("processError(callResult, capturedState, $S, $L)", functionNode.functionName(), CodeBlock.join(arguments, ", "));
} else {
if (returnType.carrierClass().equals(void.class)) {
Expand Down

0 comments on commit 50c2082

Please sign in to comment.