From 315c9285de00631644f423c5fa79a8beee5b9d47 Mon Sep 17 00:00:00 2001 From: spongehah <114657596+spongehah@users.noreply.github.com> Date: Mon, 15 Jul 2024 11:10:40 +0800 Subject: [PATCH] fix: fcntl output error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 张之阳 <51194195+luoliwoshang@users.noreply.github.com> --- _demo/fcntl/fcntl.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_demo/fcntl/fcntl.go b/_demo/fcntl/fcntl.go index b53686e54..8e312ceab 100644 --- a/_demo/fcntl/fcntl.go +++ b/_demo/fcntl/fcntl.go @@ -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)