diff options
| author | Albert Cervin <albert@acervin.com> | 2024-03-07 21:56:36 +0100 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2024-03-07 21:56:36 +0100 |
| commit | cd87d88a930a0b58cfca38678d2e757491c17b26 (patch) | |
| tree | 412352d2ae67b6e64df6320d64a3cfeda0194b88 /src/main | |
| parent | a13750209b3836a4a6a16a7ba881625f397f160f (diff) | |
| download | dged-cd87d88a930a0b58cfca38678d2e757491c17b26.tar.gz dged-cd87d88a930a0b58cfca38678d2e757491c17b26.tar.xz dged-cd87d88a930a0b58cfca38678d2e757491c17b26.zip | |
Fix asan errors
It found some really nasty ones :)
Diffstat (limited to 'src/main')
| -rw-r--r-- | src/main/completion.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/completion.c b/src/main/completion.c index acf7a78..4735c87 100644 --- a/src/main/completion.c +++ b/src/main/completion.c @@ -456,7 +456,7 @@ static uint32_t complete_path(struct completion_context ctx, void *userdata) { // check the input path here since // to_abspath removes trailing slashes - if (path[inlen - 1] != '/') { + if (inlen == 0 || path[inlen - 1] != '/') { dir = dirname(p1); file = basename(p2); } |
