Skip to content

Commit 50c2082

Browse files
committed
Fix captured state for errno
1 parent 4e8bbc2 commit 50c2082

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

annotation-processor/src/main/java/io/github/digitalsmile/composers/FunctionComposer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public String compose(String packageName, String originalName, List<FunctionNode
117117

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

0 commit comments

Comments
 (0)