Fix use of wrong block context in return-from-loop code

Closes #2142
This commit is contained in:
Marijn Haverbeke 2012-04-18 13:00:18 +02:00
parent 321ccc123d
commit 35b8f87b89
2 changed files with 4 additions and 5 deletions

View File

@ -89,9 +89,8 @@ fn verify(root: str, data: str, sig: str, keyfp: str) -> bool {
let p = gpg(["--homedir", path, "--with-fingerprint", "--verify", sig,
data]);
let res = "Primary key fingerprint: " + keyfp;
let mut rslt = false;
for str::split_char(p.err, '\n').each {|line|
if line == res { rslt = true; }
if line == res { ret true; }
}
ret rslt;
ret false;
}

View File

@ -2757,8 +2757,8 @@ fn trans_call_inner(in_cx: block, fn_expr_ty: ty::t, ret_ty: ty::t,
let mut bcx = f_res.bcx;
let ccx = cx.ccx();
let ret_flag = if ret_in_loop {
let flag = alloca(in_cx, T_bool());
Store(cx, C_bool(false), flag);
let flag = alloca(bcx, T_bool());
Store(bcx, C_bool(false), flag);
some(flag)
} else { none };