From 1bbd586cbb8e37a71d658603cd4f0b861c90f25a Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Wed, 26 Oct 2022 10:17:39 +0300 Subject: [PATCH] Fix trimming line ending in .lst files --- src/proto.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/proto.cc b/src/proto.cc index 0ca04e0..40fe210 100644 --- a/src/proto.cc +++ b/src/proto.cc @@ -239,7 +239,7 @@ int _proto_list_str(int pid, char* proto_path) *pch = '\0'; } - pch = strchr(string, '\n'); + pch = strpbrk(string, "\r\n"); if (pch != NULL) { *pch = '\0'; }