April 9, 2026
8:31 a.m.
Jacek Caban (@jacek) commented about dlls/vbscript/global.c:
+ + hres = SafeArrayGetLBound(sa, 1, &lbound); + if(FAILED(hres)) + goto done; + hres = SafeArrayGetUBound(sa, 1, &ubound); + if(FAILED(hres)) + goto done; + + hres = SafeArrayAccessData(sa, (void**)&data); + if(FAILED(hres)) + goto done; + + /* Single pass: convert, match, and collect results into a temporary array */ + { + LONG count = ubound - lbound + 1; + BSTR *matches = NULL; Please avoid such extra blocks just for variable declarations. You may just declare them at the beginning of the function.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10505#note_135672