Module: wine Branch: master Commit: 449bdc33b50d2af412b1dda9912568c8dad556c7 URL: https://gitlab.winehq.org/wine/wine/-/commit/449bdc33b50d2af412b1dda9912568c...
Author: Alex Henrie alexhenrie24@gmail.com Date: Tue Jul 4 12:13:01 2023 -0600
vbscript: Use correct pointer type in add_match (scan-build).
---
dlls/vbscript/vbregexp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/vbscript/vbregexp.c b/dlls/vbscript/vbregexp.c index 641798f97dd..4a56875ef14 100644 --- a/dlls/vbscript/vbregexp.c +++ b/dlls/vbscript/vbregexp.c @@ -1024,12 +1024,12 @@ static HRESULT add_match(IMatchCollection2 *iface, IMatch2 *add) TRACE("(%p)->(%p)\n", This, add);
if(!This->size) { - This->matches = malloc(8*sizeof(IMatch*)); + This->matches = malloc(8 * sizeof(*This->matches)); if(!This->matches) return E_OUTOFMEMORY; This->size = 8; }else if(This->size == This->count) { - IMatch2 **new_matches = realloc(This->matches, 2*This->size*sizeof(IMatch*)); + IMatch2 **new_matches = realloc(This->matches, 2 * This->size * sizeof(*This->matches)); if(!new_matches) return E_OUTOFMEMORY;