forked from TrueCloudLab/neoneo-go
util: remove bogus check from BinWriter.WriteVarUint()
val is uint64, it can't be less than zero by definition.
This commit is contained in:
parent
aacf58c9ab
commit
72fc880182
1 changed files with 0 additions and 10 deletions
|
@ -2,7 +2,6 @@ package util
|
|||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"io"
|
||||
)
|
||||
|
||||
|
@ -41,15 +40,6 @@ func (w *BinWriter) WriteVarUint(val uint64) {
|
|||
return
|
||||
}
|
||||
|
||||
if val < 0 {
|
||||
w.Err = errors.New("value out of range")
|
||||
return
|
||||
}
|
||||
|
||||
if w.Err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if val < 0xfd {
|
||||
w.Err = binary.Write(w.w, binary.LittleEndian, uint8(val))
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue