mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 08:55:11 +01:00
Remove p[i] for ptr-typed p
This commit is contained in:
1 parent
1435f1d43c
commit
877b4f648f
4 files changed
+2
-13
No files matched your search
@@ -872,9 +872,6 @@ func (q *checker) bcheckExprOther(n *a.Expr, depth uint32) (*big.Int, *big.Int,
|
||||
lengthExpr := (*a.Expr)(nil)
|
||||
if lTyp := lhs.MType(); lTyp.IsArrayType() {
|
||||
lengthExpr = lTyp.ArrayLength()
|
||||
} else if lTyp.IsPtrType() {
|
||||
// TODO: don't skip bounds checking p[i] for ptr-typed p.
|
||||
break
|
||||
} else {
|
||||
lengthExpr = makeSliceLength(lhs)
|
||||
}
|
||||
@@ -894,7 +891,6 @@ func (q *checker) bcheckExprOther(n *a.Expr, depth uint32) (*big.Int, *big.Int,
|
||||
return nil, nil, nil
|
||||
}
|
||||
|
||||
// TODO: slicing "ptr T" types?
|
||||
lengthExpr := (*a.Expr)(nil)
|
||||
if lTyp := lhs.MType(); lTyp.IsArrayType() {
|
||||
lengthExpr = lTyp.ArrayLength()
|
||||
|
||||
Reference in new issue
Block a user