aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/utils.c3
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;
}