1
0
mirror of https://github.com/golang/go synced 2024-11-26 06:07:57 -07:00

fixed bug in FixExt routine

R=r
OCL=13695
CL=13695
This commit is contained in:
Robert Griesemer 2008-07-31 15:35:25 -07:00
parent 9761a6d069
commit 57fcdcca21

View File

@ -22,7 +22,7 @@ func BaseName(s string) string {
export FixExt
func FixExt(s string) string {
i := len(s) - 3; // 3 == len(".go");
if s[i : len(s)] == ".go" {
if i >= 0 && s[i : len(s)] == ".go" {
s = s[0 : i];
}
return s + ".7";