소스 검색

Merge pull request #39 from stoeckmann/fgets

On success, fgets always terminates the result.
master
Aaron Marcher 7 년 전
committed by GitHub
부모
커밋
95ceafcae7
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. +1
    -1
      slstatus.c

+ 1
- 1
slstatus.c 파일 보기

@@ -447,7 +447,7 @@ run_command(const char *cmd)
warn("Failed to get command output for %s", cmd);
return smprintf("%s", UNKNOWN_STR);
}
fgets(buf, sizeof(buf) - 1, fp);
fgets(buf, sizeof(buf), fp);
pclose(fp);
buf[sizeof(buf) - 1] = '\0';



불러오는 중...
취소
저장