Commit 3fe07807 authored by Niels Möller's avatar Niels Möller
Browse files

(sexp_vformat): Handle %( and %).

Rev: src/nettle/sexp-format.c:1.8
Rev: src/nettle/sexp.h:1.14
parent 27889a95
......@@ -146,6 +146,14 @@ sexp_vformat(struct nettle_buffer *buffer, const char *format, va_list args)
default:
abort();
case '(':
case ')':
/* Allow unbalanced parenthesis */
if (buffer && !NETTLE_BUFFER_PUTC(buffer, format[-1]))
return 0;
done++;
break;
case 's':
{
const char *s;
......
......@@ -153,13 +153,14 @@ struct nettle_buffer;
* subexpression. Represented as unsigned length, const uint8_t
* *data.
*
* %(, %) Allows insertion of unbalanced parenthesis.
*
* Modifiers:
*
* %0 For %s, %t and %l, says that there's no length argument,
* instead the string is NUL-terminated, and there's only one
* const uint8_t * argument.
*
* FIXME: Allow "%(" for unbalanced parenthesis. */
*/
unsigned
sexp_format(struct nettle_buffer *buffer,
......
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