summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColomban Wendling <[email protected]>2025-06-25 10:58:19 +0200
committerColomban Wendling <[email protected]>2025-06-25 10:58:19 +0200
commit3431191e8b0f1304d8a39e40f42d1ac6357bb6f7 (patch)
tree42e6008755cdefe4f763f01a935205b48360e56d
parentedb212b233f5f557006319cba85951d36da6d653 (diff)
downloadengrampa-lha-fixes.tar.bz2
engrampa-lha-fixes.tar.xz
lha: Fix support for file names with spaceslha-fixes
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.
-rw-r--r--src/fr-command-lha.c2
1 files changed, 1 insertions, 1 deletions
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);
}