DLLs should work again; fixes #169

This commit is contained in:
Araq 2012-07-24 01:14:21 +02:00
commit ed915a309e
12 changed files with 29 additions and 410 deletions

View file

@ -1311,6 +1311,8 @@ proc genRangeChck(p: BProc, n: PNode, d: var TLoc, magic: string) =
[getTypeDesc(p.module, dest), rdCharLoc(a)]))
else:
InitLocExpr(p, n.sons[0], a)
if leValue(n.sons[2], n.sons[1]):
InternalError(n.info, "range check will always fail; empty range")
putIntoDest(p, d, dest, ropecg(p.module, "(($1)#$5($2, $3, $4))", [
getTypeDesc(p.module, dest), rdCharLoc(a),
genLiteral(p, n.sons[1], dest), genLiteral(p, n.sons[2], dest),