- Fix buffer calculation in argvtoW, missed unicode character size
- Fixes another crash during GIMP startup, now GIMP starts (bug #3503, part 2)
- Fix same problem in valisttoA/W

svn path=/trunk/; revision=44307
This commit is contained in:
Gregor Schneider 2009-11-28 15:16:36 +00:00
parent b06cec2ffd
commit 8e09c97596

View file

@ -128,7 +128,7 @@ argvtosT(const _TCHAR* const* argv, _TCHAR delim)
len += _tcslen(argv[i]) + 1;
}
str = ptr = (_TCHAR*) malloc(len + 1);
str = ptr = (_TCHAR*) malloc((len + 1) * sizeof(_TCHAR));
if (str == NULL)
return NULL;
@ -163,7 +163,7 @@ valisttosT(const _TCHAR* arg0, va_list alist, _TCHAR delim)
}
while(ptr != NULL);
str = (_TCHAR*) malloc(len + 1);
str = (_TCHAR*) malloc((len + 1) * sizeof(_TCHAR));
if (str == NULL)
return NULL;