Allow to generate docbook with 0 length.
authorArmin Novak <armin.novak@thincast.com>
Mon, 25 Nov 2019 14:54:05 +0000 (15:54 +0100)
committerArmin Novak <armin.novak@thincast.com>
Mon, 25 Nov 2019 14:54:05 +0000 (15:54 +0100)
client/X11/generate_argument_docbook.c

index d3af641..49b1bb1 100644 (file)
@@ -25,7 +25,7 @@ LPSTR tr_esc_str(LPCSTR arg, bool format)
        /* Prepare a initial buffer with the size of the result string. */
        ds = s + 1;
 
-       if (s)
+       if (ds)
        {
                tmp2 = (LPSTR)realloc(tmp, ds * sizeof(CHAR));
                if (!tmp2)