You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
541 B
13 lines
541 B
5 years ago
|
diff -up patch-2.7.1/src/pch.c.me patch-2.7.1/src/pch.c
|
||
|
--- patch-2.7.1/src/pch.c.me 2018-11-22 14:09:28.099973290 +0100
|
||
|
+++ patch-2.7.1/src/pch.c 2018-11-22 14:17:57.741797271 +0100
|
||
|
@@ -2278,7 +2278,7 @@ pfetch (lin line)
|
||
|
bool
|
||
|
pch_write_line (lin line, FILE *file)
|
||
|
{
|
||
|
- bool after_newline = p_line[line][p_len[line] - 1] == '\n';
|
||
|
+ bool after_newline = (p_len[line] > 0) && (p_line[line][p_len[line] - 1] == '\n');
|
||
|
if (! fwrite (p_line[line], sizeof (*p_line[line]), p_len[line], file))
|
||
|
write_fatal ();
|
||
|
return after_newline;
|