diff options
author | Anton Carver <anton@google.com> | 2015-07-30 18:51:16 +0100 |
---|---|---|
committer | Anton Carver <anton@google.com> | 2015-07-31 15:43:38 +0100 |
commit | b690e3526860861fd6286b3d12a970194adac7ee (patch) | |
tree | 29811197c7a536d0fd50153e8d595d1e99a976ce /gapii | |
parent | 261426a55b99f3cf5c66e64b8c452b36266dd28b (diff) | |
download | gpu-b690e3526860861fd6286b3d12a970194adac7ee.tar.gz |
Little fix for if bytes captured is zero.
Change-Id: I2dd4a50b75b58c0e5cbf7261b5742ba49e2633ae
Diffstat (limited to 'gapii')
-rw-r--r-- | gapii/capture.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gapii/capture.go b/gapii/capture.go index 1cf38be46..430d61a2e 100644 --- a/gapii/capture.go +++ b/gapii/capture.go @@ -49,6 +49,9 @@ var formats = []string{ } func (s siSize) String() string { + if s == 0 { + return "0.0B" + } size := float64(s) e := math.Floor(math.Log(size) / math.Log(1000)) f := formats[int(e)] |