OSDN Git Service

Update to current version of Go library.
[pf3gnuchains/gcc-fork.git] / libgo / go / big / int.go
index ecd70e0..f1ea7b1 100644 (file)
@@ -337,6 +337,10 @@ func fmtbase(ch int) int {
 // 'x' (hexadecimal).
 //
 func (x *Int) Format(s fmt.State, ch int) {
+       if x == nil {
+               fmt.Fprint(s, "<nil>")
+               return
+       }
        if x.neg {
                fmt.Fprint(s, "-")
        }