summary refs log tree commit diff stats
path: root/lib/std/syncio.nim
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2024-02-05 19:14:21 +0800
committerGitHub <noreply@github.com>2024-02-05 12:14:21 +0100
commita1d820367f677d06c2c9f93d1c2f88105e7d7b36 (patch)
tree67590514d4442a5f85a22cb9b4de26e64d9e01d4 /lib/std/syncio.nim
parentdd753b33830ab084686f9cf9c7d573702f175bb5 (diff)
downloadNim-a1d820367f677d06c2c9f93d1c2f88105e7d7b36.tar.gz
follow up #22380; fixes incorrect usages of `newWideCString` (#23278)
follow up #22380
Diffstat (limited to 'lib/std/syncio.nim')
-rw-r--r--lib/std/syncio.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/syncio.nim b/lib/std/syncio.nim
index b664c3b60..38c151bb7 100644
--- a/lib/std/syncio.nim
+++ b/lib/std/syncio.nim
@@ -419,7 +419,7 @@ proc readLine*(f: File, line: var string): bool {.tags: [ReadIOEffect],
     if f.isatty:
       const numberOfCharsToRead = 2048
       var numberOfCharsRead = 0'i32
-      var buffer = newWideCString("", numberOfCharsToRead)
+      var buffer = newWideCString(numberOfCharsToRead)
       if readConsole(getOsFileHandle(f), addr(buffer[0]),
         numberOfCharsToRead, addr(numberOfCharsRead), nil) == 0:
         var error = getLastError()