summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2018-05-12 18:56:42 -0700
committerOri Bernstein <ori@eigenstate.org>2018-05-12 18:56:42 -0700
commitf52ac3cb5ada4ec50019cf8a09c981c040f56e4d (patch)
treea6c1961b230709c0920b847170dc59678efa04b1
parent398cc4d0f4b41f726d6f734804b504d5bfedf4d9 (diff)
downloadmc-f52ac3cb5ada4ec50019cf8a09c981c040f56e4d.tar.gz
Remove useless bounds check.
We already do it when packing the value.
-rw-r--r--lib/std/putint.myr2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/std/putint.myr b/lib/std/putint.myr
index c05ee7a..df2a979 100644
--- a/lib/std/putint.myr
+++ b/lib/std/putint.myr
@@ -39,7 +39,6 @@ generic putbe8 = {buf, v; -> putbe(buf, (v : uint64), 1)}
const putbe = {buf, val, n
var k
- iassert(buf.len >= n, "buffer too small")
for var i = 0; i < n; i++
k = val >> (8*(n-i-1))
buf[i] = (k & 0xff: byte)
@@ -48,7 +47,6 @@ const putbe = {buf, val, n
}
const putle = {buf, val, n
- iassert(buf.len >= n, "buffer too small")
for var i = 0; i < n; i++
buf[i] = (val & 0xff : byte)
val >>= 8