Jacek Caban : vbscript: Fixed local variable count calculation.
Alexandre Julliard
julliard at winehq.org
Mon Oct 24 13:43:55 CDT 2011
Module: wine
Branch: master
Commit: 851856af67accf8cb901ec8252f83661b96290c4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=851856af67accf8cb901ec8252f83661b96290c4
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Oct 24 12:30:48 2011 +0200
vbscript: Fixed local variable count calculation.
---
dlls/vbscript/compile.c | 2 +-
dlls/vbscript/tests/lang.vbs | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/vbscript/compile.c b/dlls/vbscript/compile.c
index 153e9b0..9b3f3e6 100644
--- a/dlls/vbscript/compile.c
+++ b/dlls/vbscript/compile.c
@@ -746,6 +746,7 @@ static HRESULT compile_dim_statement(compile_ctx_t *ctx, dim_statement_t *stat)
return E_FAIL;
}
+ ctx->func->var_cnt++;
if(!dim_decl->next)
break;
dim_decl = dim_decl->next;
@@ -753,7 +754,6 @@ static HRESULT compile_dim_statement(compile_ctx_t *ctx, dim_statement_t *stat)
dim_decl->next = ctx->dim_decls;
ctx->dim_decls = stat->dim_decls;
- ctx->func->var_cnt++;
return S_OK;
}
diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs
index ec552b1..0025d69 100644
--- a/dlls/vbscript/tests/lang.vbs
+++ b/dlls/vbscript/tests/lang.vbs
@@ -470,6 +470,7 @@ Sub TestSubLocalVal
x = false
Call ok(not x, "local x is not false?")
Dim x
+ Dim a,b, c
End Sub
x = true
More information about the wine-cvs
mailing list