]> diplodocus.org Git - nmh/blobdiff - sbr/fmt_scan.c
Reworked attach to add charset to Content-Type string for
[nmh] / sbr / fmt_scan.c
index 4460c62800def628d1578934c8e5f3fd0c30a41f..fe2a00449410c709eb36b7300d4a41f6bacea648 100644 (file)
@@ -1079,7 +1079,7 @@ fmt_scan (struct format *format, char *scanl, size_t max, int width, int *dat,
               there isn't enough room in the buffer for the entire
               string, skip it completely.  Need room for null
               terminator, and maybe trailing newline (added below). */
-           if (cp - scanl + strlen (str) + 1 < max) {
+           if (str && (cp - scanl + strlen (str) + 1 < max)) {
                for (sp = str; *sp; *cp++ = *sp++) continue;
            }
            if (callbacks && callbacks->trace_func)