Skip to content

Commit

Permalink
fix: fcntl output error
Browse files Browse the repository at this point in the history
Co-authored-by: 张之阳 <[email protected]>
  • Loading branch information
spongehah and luoliwoshang authored Jul 15, 2024
1 parent c22427b commit 315c928
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _demo/fcntl/fcntl.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func main() {

// Ensure that the buffer is null-terminated
buffer[bytesRead] = c.Char(0)
c.Printf(c.Str("Read %ld bytes: %s\n"), bytesRead, buffer)
c.Printf(c.Str("Read %ld bytes: %s\n"), bytesRead, &buffer[0])

// Close file
os.Close(fd)
Expand Down

0 comments on commit 315c928

Please sign in to comment.