--- lib/srchilite/readtags.c~0	2012-04-14 20:29:33.000000000 +0300
+++ lib/srchilite/readtags.c	2019-03-11 08:45:58.289468800 +0200
@@ -157,12 +157,13 @@
 static void copyName (tagFile *const file)
 {
     size_t length;
-    const char *end = strchr (file->line.buffer, '\t');
+    const char *end = strchr (file->line.buffer, '\t'), *end2;
     if (end == NULL)
     {
 	end = strchr (file->line.buffer, '\n');
-	if (end == NULL)
-	    end = strchr (file->line.buffer, '\r');
+	end2 = strchr (file->line.buffer, '\r');
+	if (end == NULL || end2 < end)
+	    end = end2;
     }
     if (end != NULL)
 	length = end - file->line.buffer;
@@ -454,7 +455,7 @@
 	result->fields.max = 20;
 	result->fields.list = (tagExtensionField*) malloc (
 	    result->fields.max * sizeof (tagExtensionField));
-	result->fp = fopen (filePath, "r");
+	result->fp = fopen (filePath, "rb");
 	if (result->fp == NULL)
 	{
 	    /* added by Lorenzo Bettini, to avoid memory leaks */
