[swc] Fix off-by-one