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
54191126
Commit
54191126
authored
Oct 07, 2012
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/gc: avoid crash in %N print
R=ken2 CC=golang-dev
https://golang.org/cl/6609052
parent
373dbcb3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
fmt.c
src/cmd/gc/fmt.c
+2
-2
No files found.
src/cmd/gc/fmt.c
View file @
54191126
...
...
@@ -1086,9 +1086,9 @@ exprfmt(Fmt *f, Node *n, int prec)
case
OLITERAL
:
// this is a bit of a mess
if
(
fmtmode
==
FErr
&&
n
->
sym
!=
S
)
return
fmtprint
(
f
,
"%S"
,
n
->
sym
);
if
(
n
->
val
.
ctype
==
CTNIL
)
if
(
n
->
val
.
ctype
==
CTNIL
&&
n
->
orig
!=
N
)
n
=
n
->
orig
;
// if this node was a nil decorated with at type, print the original naked nil
if
(
n
->
type
!=
types
[
n
->
type
->
etype
]
&&
n
->
type
!=
idealbool
&&
n
->
type
!=
idealstring
)
{
if
(
n
->
type
!=
T
&&
n
->
type
!=
types
[
n
->
type
->
etype
]
&&
n
->
type
!=
idealbool
&&
n
->
type
!=
idealstring
)
{
// Need parens when type begins with what might
// be misinterpreted as a unary operator: * or <-.
if
(
isptr
[
n
->
type
->
etype
]
||
(
n
->
type
->
etype
==
TCHAN
&&
n
->
type
->
chan
==
Crecv
))
...
...
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