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
14e04f4d
Commit
14e04f4d
authored
May 13, 2010
by
Roger Peppe
Committed by
Rob Pike
May 13, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent Printf crashing when giving an extra nil argument.
R=rsc, r CC=golang-dev
https://golang.org/cl/1195041
parent
e0bde8cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
print.go
src/pkg/fmt/print.go
+4
-2
No files found.
src/pkg/fmt/print.go
View file @
14e04f4d
...
...
@@ -1053,8 +1053,10 @@ func (p *pp) doprintf(format string, a []interface{}) {
p
.
buf
.
Write
(
extraBytes
)
for
;
fieldnum
<
len
(
a
);
fieldnum
++
{
field
:=
a
[
fieldnum
]
p
.
buf
.
WriteString
(
reflect
.
Typeof
(
field
)
.
String
())
p
.
buf
.
WriteByte
(
'='
)
if
field
!=
nil
{
p
.
buf
.
WriteString
(
reflect
.
Typeof
(
field
)
.
String
())
p
.
buf
.
WriteByte
(
'='
)
}
p
.
printField
(
field
,
false
,
false
,
0
)
if
fieldnum
+
1
<
len
(
a
)
{
p
.
buf
.
Write
(
commaSpaceBytes
)
...
...
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