From 4244cd1cb492fa1d10986ec67f862964c073f844 Mon Sep 17 00:00:00 2001 From: Paul Wankadia Date: Fri, 21 May 2021 04:24:17 -0700 Subject: [PATCH] Fix a bug in `Regexp::ToString()`. Change-Id: Ib02554e460dbf45502bcab8798a0c1659c5ff83d Reviewed-on: https://code-review.googlesource.com/c/re2/+/58630 Reviewed-by: Paul Wankadia --- re2/tostring.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/re2/tostring.cc b/re2/tostring.cc index 4545a92dd..9c1c038ca 100644 --- a/re2/tostring.cc +++ b/re2/tostring.cc @@ -291,7 +291,7 @@ int ToStringWalker::PostVisit(Regexp* re, int parent_arg, int pre_arg, // There's no syntax accepted by the parser to generate // this node (it is generated by RE2::Set) so make something // up that is readable but won't compile. - t_->append("(?HaveMatch:%d)", re->match_id()); + t_->append(StringPrintf("(?HaveMatch:%d)", re->match_id())); break; }