Deprecated laxStrings for mutating the internal zero terminator on strings and its Deprecated code cleaned out (#14766)
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
This commit is contained in:
parent
c3459c7b14
commit
28510a9da9
7 changed files with 4 additions and 9 deletions
|
|
@ -930,7 +930,7 @@ proc genSeqElem(p: BProc, n, x, y: PNode, d: var TLoc) =
|
|||
if ty.kind in {tyRef, tyPtr}:
|
||||
ty = skipTypes(ty.lastSon, abstractVarRange) # emit range check:
|
||||
if optBoundsCheck in p.options:
|
||||
if ty.kind == tyString and (not defined(nimNoZeroTerminator) or optLaxStrings in p.options):
|
||||
if ty.kind == tyString and not defined(nimNoZeroTerminator):
|
||||
linefmt(p, cpsStmts,
|
||||
"if ((NU)($1) > (NU)$2){ #raiseIndexError2($1,$2); $3}$n",
|
||||
[rdLoc(b), lenExpr(p, a), raiseInstr(p)])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue