commit | 97e67f4f65bd17a63beb92f1e824f662aba1721a | [log] [tgz] |
---|---|---|
author | Nick Craig-Wood <nick@craig-wood.com> | Thu Apr 23 22:54:52 2015 +0100 |
committer | Nick Craig-Wood <nick@craig-wood.com> | Thu Apr 23 23:21:05 2015 +0100 |
tree | 8e31a78e0083b718d9d5c04474bd5a0e73bb10f0 | |
parent | 837a81a1b21294ced895f2610fc258a487486c23 [diff] |
cmd/stringer: fix panic caused by integer overflow When String() was called on the maximum value of an integer type (eg 255 for uint8) this would cause an integer overflow, which would cause an index error later in the code. Fixed by re-arranging the code slightly. Fixes golang/go#10563 Change-Id: I9fd016afc5eea22adbc3843f6081091fd50deccf