Commit 196781c9 authored by Chen Bill's avatar Chen Bill

fix fieldargs()

parent 95959307
...@@ -30,7 +30,7 @@ function bit.bnot(a) ...@@ -30,7 +30,7 @@ function bit.bnot(a)
return ~a return ~a
end end
local function fieldargs(f,width) local function fieldargs(f,width)
w=width or 1 local w=width or 1
assert(f>=0,"field cannot be negative") assert(f>=0,"field cannot be negative")
assert(w>0,"width must be positive") assert(w>0,"width must be positive")
assert(f+w<=32,"trying to access non-existent bits") assert(f+w<=32,"trying to access non-existent bits")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment