Jelajahi Sumber

fix loc.Location, re-enable tip

Dave Cheney 10 tahun lalu
induk
melakukan
ab94cc2ab2
2 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 1 0
      .travis.yml
  2. 1 1
      errors.go

+ 1 - 0
.travis.yml

@@ -4,6 +4,7 @@ go:
   - 1.4.3
   - 1.5.4
   - 1.6.1
+  - tip
 
 script:
   - go test -v ./...

+ 1 - 1
errors.go

@@ -59,7 +59,7 @@ import (
 type loc uintptr
 
 func (l loc) Location() (string, int) {
-	pc := uintptr(l)
+	pc := uintptr(l) - 1
 	fn := runtime.FuncForPC(pc)
 	if fn == nil {
 		return "unknown", 0