fix: fcntl output error

Co-authored-by: 张之阳 <51194195+luoliwoshang@users.noreply.github.com>
This commit is contained in:
spongehah
2024-07-15 11:10:40 +08:00
committed by GitHub
parent c22427b8fd
commit 315c9285de

View File

@@ -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)