fixes #106
This commit is contained in:
parent
3c9e3a6a71
commit
2efdf3df81
3 changed files with 25 additions and 13 deletions
|
|
@ -271,7 +271,7 @@ proc resetLoc(p: BProc, loc: var TLoc) =
|
|||
genObjectInit(p, cpsStmts, loc.t, loc, true)
|
||||
|
||||
proc constructLoc(p: BProc, loc: TLoc, section = cpsStmts) =
|
||||
if not isComplexValueType(skipTypes(loc.t, abstractVarRange)):
|
||||
if not isComplexValueType(skipTypes(loc.t, abstractRange)):
|
||||
lineF(p, section, "$1 = 0;$n", [rdLoc(loc)])
|
||||
else:
|
||||
lineF(p, section, "memset((void*)$1, 0, sizeof($2));$n",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue