From 3431191e8b0f1304d8a39e40f42d1ac6357bb6f7 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Wed, 25 Jun 2025 10:58:19 +0200 Subject: lha: Fix support for file names with spaces See e.g. lha_os2_208/lfn.lzh or lha_os2_208/h3_lfn.lzh from https://github.com/fragglet/lhasa/tree/master/test/archives. --- src/fr-command-lha.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/fr-command-lha.c b/src/fr-command-lha.c index 53df6c5..5371f91 100644 --- a/src/fr-command-lha.c +++ b/src/fr-command-lha.c @@ -149,7 +149,7 @@ split_line_lha (char *line) scan = eat_spaces (scan); for (; i < N_FIELDS; i++) { field_end = strchr (scan, ' '); - if (field_end == NULL) { + if (field_end == NULL || (i + 1) == N_FIELDS) { field_end = scan + strlen(scan); } -- cgit v1.2.1