Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2371776

Browse files
committed
Fix for adding \n for zero-length win32 read_pipe return
1 parente617fe7 commit2371776

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/port/exec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/port/exec.c,v 1.22 2004/08/1601:26:31 momjian Exp $
10+
* $PostgreSQL: pgsql/src/port/exec.c,v 1.23 2004/08/1602:46:36 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -402,7 +402,7 @@ static char *pipe_read_line(char *cmd, char *line, int maxsize)
402402
*We emulate fgets() behaviour. So if there is no newline
403403
*at the end, we add one...
404404
*/
405-
if (line[len-1]!='\n')
405+
if (len==0||line[len-1]!='\n')
406406
strcat(line,"\n");
407407
}
408408

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp