April 8, 2026
6:12 p.m.
Jacek Caban (@jacek) commented about dlls/vbscript/global.c:
+ if(!SysStringLen(search)) + found = 1; + else + found = FindStringOrdinal(FIND_FROMSTART, str, SysStringLen(str), + search, SysStringLen(search), mode) >= 0; + + if(conv_str) + SysFreeString(conv_str); + + if(include ? found : !found) + match_count++; + } + + /* Create result array */ + bounds.lLbound = 0; + bounds.cElements = match_count ? match_count : 0; You could just assign `match_count` here, there is no need to check for 0 if we're assigning 0 anyway.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10505#note_135529