Commit d8274da4 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Fix a end-of-string mistake (spotted by FlexeLint)

parent 84b14baa
......@@ -692,13 +692,12 @@ parse_format(const char *format)
for (p = format; *p != '\0'; p++) {
/* Allow the most essential escape sequences in format */
if (*p == '\\') {
p++;
if (*p == 't')
if (*p == '\\' && p[1] != '\0') {
if (*++p == 't')
AZ(VSB_putc(vsb, '\t'));
else if (*p == 'n')
AZ(VSB_putc(vsb, '\n'));
else if (*p != '\0')
else
AZ(VSB_putc(vsb, *p));
continue;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment