Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
fad27ec5
Commit
fad27ec5
authored
May 17, 2013
by
Alex Brainman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
os: clarify windows read console code
R=golang-dev, r CC=golang-dev
https://golang.org/cl/9458043
parent
c15ca825
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
file_windows.go
src/pkg/os/file_windows.go
+4
-4
No files found.
src/pkg/os/file_windows.go
View file @
fad27ec5
...
...
@@ -253,12 +253,12 @@ func (f *File) readConsole(b []byte) (n int, err error) {
if
len
(
f
.
readbuf
)
==
0
{
// syscall.ReadConsole seems to fail, if given large buffer.
// So limit the buffer to 16000 characters.
readN
:=
16000
if
len
(
b
)
<
readN
{
readN
=
len
(
b
)
numBytes
:=
len
(
b
)
if
numBytes
>
16000
{
numBytes
=
16000
}
// get more input data from os
wchars
:=
make
([]
uint16
,
readN
)
wchars
:=
make
([]
uint16
,
numBytes
)
var
p
*
uint16
if
len
(
b
)
>
0
{
p
=
&
wchars
[
0
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment