[PATCH 3/3] mshtml: Added support for indexed access to form elements

Alexandre Julliard julliard at winehq.org
Thu Mar 3 08:03:42 CST 2011


Jacek Caban <jacek at codeweavers.com> writes:

> On 3/3/11 2:45 PM, Alexandre Julliard wrote:
>> Jacek Caban<jacek at codeweavers.com>  writes:
>>
>>> +    /* FIXME: Implement in more generic and safe way */
>>> +    for(ptr = name; *ptr&&  isdigitW(*ptr); ptr++)
>>> +        i = i*10 + (*ptr-'0');
>> What's wrong with strtoulW?
>
> We don't want to use strings like "+1" or with leasing spaces for
> indexed access.

You can check the first character before passing it to strtoulW, that
would already be better than doing it all by hand. Note that isdigitW
won't do the right thing, not all Unicode digits are between '0' and
'9'.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list