Skip to content

Commit

Permalink
Perl: add an assertion
Browse files Browse the repository at this point in the history
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
  • Loading branch information
masatake committed Dec 9, 2022
1 parent 97fb25a commit dc501cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion parsers/perl.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,9 @@ static void collectHereDocMarkers (struct hereDocMarkerManager *mgr,
const unsigned char *line)
{
const unsigned char *cp = line;
while ((cp = collectHereDocMarker(mgr, cp)) != NULL);
const unsigned char *last = cp;
while ((cp = collectHereDocMarker(mgr, cp)) != NULL)
Assert(last < cp);
}

static bool isInHereDoc (struct hereDocMarkerManager *mgr,
Expand Down

0 comments on commit dc501cb

Please sign in to comment.