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
e5636d6e
Commit
e5636d6e
authored
Nov 12, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avoid seg fault when return type is unknown
Fixes #80. R=ken
https://golang.org/cl/154079
parent
8b957209
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
subr.c
src/cmd/gc/subr.c
+5
-0
No files found.
src/cmd/gc/subr.c
View file @
e5636d6e
...
@@ -1138,6 +1138,11 @@ Tpretty(Fmt *fp, Type *t)
...
@@ -1138,6 +1138,11 @@ Tpretty(Fmt *fp, Type *t)
break
;
break
;
case
1
:
case
1
:
t1
=
getoutargx
(
t
)
->
type
;
t1
=
getoutargx
(
t
)
->
type
;
if
(
t1
==
T
)
{
// failure to typecheck earlier; don't know the type
fmtprint
(
fp
,
" ?unknown-type?"
);
break
;
}
if
(
t1
->
etype
!=
TFIELD
&&
t1
->
etype
!=
TFUNC
)
{
if
(
t1
->
etype
!=
TFIELD
&&
t1
->
etype
!=
TFUNC
)
{
fmtprint
(
fp
,
" %T"
,
t1
);
fmtprint
(
fp
,
" %T"
,
t1
);
break
;
break
;
...
...
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