From 1db600548e7406253e830e1e78e9fa50caf1516c Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 9 Jun 2019 13:55:07 +0900 Subject: [PATCH] Fix for decl test scope issue --- tools/qfcc/test/fordecl.r | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/qfcc/test/fordecl.r b/tools/qfcc/test/fordecl.r index 9277dc828..70d57690a 100644 --- a/tools/qfcc/test/fordecl.r +++ b/tools/qfcc/test/fordecl.r @@ -5,12 +5,15 @@ test_fordecl () { int fail = 1; int count = 5; + int ti = -1, tj = -1; for (int i = 3, j = 5; count-- > 0; ) { i += 2; j += 3; + ti = i; + tj = j; } - if (i == 13 && j == 20) { + if (ti == 13 && tj == 20) { fail = 0; }