diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-08-10 16:03:03 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-08-10 16:03:03 +0000 |
commit | ab0b6ce56f9c3a505619de49df94a370a9732d88 (patch) | |
tree | 3dcf01d4daee7a3a9dab34edca836f1fab58164e /src/utils.c | |
parent | ef810011383260403155450d87f9fd5e5184396a (diff) | |
download | mpd-ab0b6ce56f9c3a505619de49df94a370a9732d88.tar.gz mpd-ab0b6ce56f9c3a505619de49df94a370a9732d88.tar.xz mpd-ab0b6ce56f9c3a505619de49df94a370a9732d88.zip |
for improperly config file lines, print the line number
also, in myFgets, chop off '\r' at the end of the line (thanx mr gates)
git-svn-id: https://svn.musicpd.org/mpd/trunk@2000 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/utils.c')
-rw-r--r-- | src/utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils.c b/src/utils.c index fbcf3d9dd..a057fa33f 100644 --- a/src/utils.c +++ b/src/utils.c @@ -32,6 +32,9 @@ char * myFgets(char * buffer, int bufferSize, FILE * fp) { if(ret && strlen(buffer)>0 && buffer[strlen(buffer)-1]=='\n') { buffer[strlen(buffer)-1] = '\0'; } + if(ret && strlen(buffer)>0 && buffer[strlen(buffer)-1]=='\r') { + buffer[strlen(buffer)-1] = '\0'; + } return ret; } |