Jacek Caban : vbscript: Fixed chr(0) implementation.

Alexandre Julliard julliard at winehq.org
Wed Feb 27 14:41:58 CST 2013


Module: wine
Branch: master
Commit: b58dadf03b75d703387c6c9a3732a487084d026e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b58dadf03b75d703387c6c9a3732a487084d026e

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Feb 27 12:55:43 2013 +0100

vbscript: Fixed chr(0) implementation.

---

 dlls/vbscript/global.c      |    2 +-
 dlls/vbscript/tests/api.vbs |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/vbscript/global.c b/dlls/vbscript/global.c
index cba611f..5b4af6f 100644
--- a/dlls/vbscript/global.c
+++ b/dlls/vbscript/global.c
@@ -1088,7 +1088,7 @@ static HRESULT Global_Chr(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIA
     if(FAILED(hres))
         return hres;
 
-    if(c <= 0 || c >= 0x100) {
+    if(c < 0 || c >= 0x100) {
         FIXME("invalid arg\n");
         return E_FAIL;
     }
diff --git a/dlls/vbscript/tests/api.vbs b/dlls/vbscript/tests/api.vbs
index fc057d8..3e53813 100644
--- a/dlls/vbscript/tests/api.vbs
+++ b/dlls/vbscript/tests/api.vbs
@@ -119,6 +119,7 @@ if isEnglishLang then TestCStr true, "True"
 Call ok(getVT(Chr(120)) = "VT_BSTR", "getVT(Chr(120)) = " & getVT(Chr(120)))
 Call ok(getVT(Chr(255)) = "VT_BSTR", "getVT(Chr(255)) = " & getVT(Chr(255)))
 Call ok(Chr(120) = "x", "Chr(120) = " & Chr(120))
+Call ok(Chr(0) <> "", "Chr(0) = """"")
 
 Call ok(isObject(new EmptyClass), "isObject(new EmptyClass) is not true?")
 Set x = new EmptyClass




More information about the wine-cvs mailing list