diff options
author | Karl Williamson <khw@cpan.org> | 2022-06-10 10:52:52 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-06-10 11:02:05 -0600 |
commit | afe34b1ad3e565e2ad0157c4b43a67b0d984c113 (patch) | |
tree | 99140ecf046c94a8e8502e6145acbf764b7bffe1 /toke.c | |
parent | 00a5df846e035280750985222a693ac58022ee36 (diff) | |
download | perl-afe34b1ad3e565e2ad0157c4b43a67b0d984c113.tar.gz |
toke.c: Remove Undefined C behavior
Spotted by clang 14.
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -12341,8 +12341,12 @@ S_scan_formline(pTHX_ char *s) } } eol = (char *) memchr(s,'\n',PL_bufend-s); - if (!eol++) - eol = PL_bufend; + if (! eol) { + eol = PL_bufend; + } + else { + eol++; + } if (*s != '#') { char *t; for (t = s; t < eol; t++) { |