<div dir="ltr"><div class="gmail_extra"><br><br><div class="gmail_quote">2014-04-29 0:04 GMT+08:00 Piotr Caban <span dir="ltr"><<a href="mailto:piotr.caban@gmail.com" target="_blank">piotr.caban@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 04/28/14 17:26, Shuai Meng wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
<br>
<br>
<br>
2014-04-21 17:18 GMT+08:00 Jacek Caban <<a href="mailto:jacek@codeweavers.com" target="_blank">jacek@codeweavers.com</a><br></div>
<mailto:<a href="mailto:jacek@codeweavers.com" target="_blank">jacek@codeweavers.com</a>><u></u>>:<div class=""><br>
<br>
    Hi Shuai,<br>
<br>
    On 04/21/14 03:45, Shuai Meng wrote:<br>
     > -<br>
     > -    return return_bool(res, val);<br>
     > +    V_VT(res) = VT_EMPTY;<br>
     > +    return VariantChangeType(res, arg, VARIANT_LOCALBOOL, VT_BOOL);<br>
<br>
    You can't assume that res is not NULL. If result of the function is not<br>
    used, it will be NULL. A simple test case is like this:<br>
<br>
    call CBool(0)<br>
<br>
    Also, are you sure we want VARIANT_LOCALBOOL here? Did you test it<br>
    (probably by running tests on localized Windows with translated string<br>
    "False")?<br>
<br>
  I don't quite understand what this parameter means, in fact I just<br>
copy it from to_string(). If not VARIANT_LOCALBOOL, waht esle should be<br>
filled here?<br>
</div></blockquote>
<br>
I've checked what happens on non-english locale and CStr(True) = "True". So the flag is used incorrectly in CStr implementation. CBool is also failing when localized string is passed.<br>
<br>
You can use 0 as flag in VariantChangeType.<br>
</blockquote></div><br></div><div class="gmail_extra">I've fixed this, but another problem appears. I put my new patch in the attachment, along with the test result of wine. It fails when tested in wine, while normal in my windows. I can't understand, this patch is almost the same with the previous one.</div>
</div>