Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Don't eat the escaped character when it's a bogus escape sequence.
Matthew Seaman committed 12 years ago
commit 732bf4c5a73fd97a40218aba03efbd68b19570c2
parent d0fcef2
1 file changed +2 -3
modified libpkg/pkg_printf.c
@@ -1958,10 +1958,9 @@ process_escape(struct sbuf *sbuf, const char *f)
		f = read_oct_byte(sbuf, f);
		break;
	default:		/* If it's not a recognised escape,
-
				   pass it through unchanged */
+
				   leave f pointing at the escaped
+
				   character */
		sbuf_putc(sbuf, '\\');
-
		sbuf_putc(sbuf, *f);
-
		f++;
		break;
	}