Startup fix for scanbin 6.0

Stefan Leichter Stefan.Leichter at camline.com
Thu Apr 4 12:48:04 CST 2002


Am Donnerstag, 4. April 2002 00:44 schrieben Sie:
> On April 3, 2002 03:58 pm, Stefan Leichter wrote:
> > +   if (!str) {
> > +       ERR("called without text\n");
>
>           ^^^
> This is not an ERR (which signals an internal Wine error), maybe a WARN,
> but I would suggest instead just:
>
> +    if (!str) return 0;

i thought the NULL - pointer is the result of a missing feature or a bug in 
wine. For me i does not make sense to call the functions DrawText* without a 
text. Nevertheless here is the patch without the ERR.

Stefan

ChangeLog:
        * dlls/user/text.c:
        <Stefan.Leichter at camLine.com>
        fixed crash on uninitialized pointer in DrawTextExA

--- ../wine-20020310/dlls/user/text.c   Mon Mar 11 19:38:16 2002
+++ dlls/user/text.c    Thu Apr  4 20:32:10 2002
@@ -965,6 +965,7 @@
    DWORD wmax;
    DWORD amax;

+   if (!str) return 0;
    if (count == -1) count = strlen(str);
    if (!count) return 0;
    wcount = MultiByteToWideChar( CP_ACP, 0, str, count, NULL, 0 );



More information about the wine-patches mailing list