Hi,
On 07/11/14 05:49, Shuai Meng wrote:
static HRESULT Global_Abs(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res) {
- FIXME("\n");
- return E_NOTIMPL;
- TRACE("(%s)\n", debugstr_variant(arg));
- assert(args_cnt == 1);
- if(!res)
return S_OK;
- return VarAbs(arg,res); }
You're not handling res==NULL case correctly. E.g. Call Abs("string") should fail.
Thanks, Piotr
Thank you for commenting.
2014-07-11 16:50 GMT+08:00 Piotr Caban piotr.caban@gmail.com:
Hi,
On 07/11/14 05:49, Shuai Meng wrote:
static HRESULT Global_Abs(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res) {
- FIXME("\n");
- return E_NOTIMPL;
- TRACE("(%s)\n", debugstr_variant(arg));
- assert(args_cnt == 1);
- if(!res)
return S_OK;
- return VarAbs(arg,res); }
You're not handling res==NULL case correctly. E.g. Call Abs("string") should fail.
I have tested this case for many times, and I think Call Abs("string") is just OK https://testbot.winehq.org/JobDetails.pl?Key=7967 and it's OK that write directly using vbscript on wiinxp and win7.
Thanks, Piotr
On 07/13/14 15:49, Shuai Meng wrote:
You're not handling res==NULL case correctly. E.g. Call Abs("string") should fail.
I have tested this case for many times, and I think Call Abs("string") is just OK https://testbot.winehq.org/JobDetails.pl?Key=7967 and it's OK that write directly using vbscript on wiinxp and win7.
Abs should behave in the same way no matter it's return value is used or not. You have added following test: Call Abs(-4) it succeeds because -4 is a valid Abs argument. If you add this test: Call Abs("string") it will fail on windows.
2014-07-13 22:35 GMT+08:00 Piotr Caban piotr.caban@gmail.com:
On 07/13/14 15:49, Shuai Meng wrote:
You're not handling res==NULL case correctly. E.g. Call Abs("string") should fail.
I have tested this case for many times, and I think Call Abs("string") is just OK https://testbot.winehq.org/JobDetails.pl?Key=7967 and it's OK that write directly using vbscript on wiinxp and win7.
Abs should behave in the same way no matter it's return value is used or not. You have added following test: Call Abs(-4) it succeeds because -4 is a valid Abs argument. If you add this test: Call Abs("string") it will fail on windows.
OK,I misunderstand you at first. So maybe I can just remove the two lines
when res == NULL, I tested it and the result is good.
On 07/14/14 04:47, Shuai Meng wrote:
2014-07-13 22:35 GMT+08:00 Piotr Caban <piotr.caban@gmail.com mailto:piotr.caban@gmail.com>:
On 07/13/14 15:49, Shuai Meng wrote: You're not handling res==NULL case correctly. E.g. Call Abs("string") should fail. I have tested this case for many times, and I think Call Abs("string") is just OK https://testbot.winehq.org/__JobDetails.pl?Key=7967 <https://testbot.winehq.org/JobDetails.pl?Key=7967> and it's OK that write directly using vbscript on wiinxp and win7. Abs should behave in the same way no matter it's return value is used or not. You have added following test: Call Abs(-4) it succeeds because -4 is a valid Abs argument. If you add this test: Call Abs("string") it will fail on windows.
OK,I misunderstand you at first. So maybe I can just remove the two lines when res == NULL, I tested it and the result is good.
You can't pass NULL to VarAbs function.