mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
cscope: Fix mismatched types in ':cscope show' output
Type long on 32-bit systems is typically 32 bits, but PRId64 is 64 bits. This mismatch leads to bad output or segfaults on :cs show. Fixes #4537
This commit is contained in:
parent
91c5005da8
commit
80471df208
@ -2081,12 +2081,13 @@ static int cs_show(exarg_T *eap)
|
||||
if (csinfo[i].fname == NULL)
|
||||
continue;
|
||||
|
||||
if (csinfo[i].ppath != NULL)
|
||||
(void)smsg("%2zu %-5" PRId64 " %-34s %-32s",
|
||||
i, (long)csinfo[i].pid, csinfo[i].fname, csinfo[i].ppath);
|
||||
else
|
||||
(void)smsg("%2zu %-5" PRId64 " %-34s <none>",
|
||||
i, (long)csinfo[i].pid, csinfo[i].fname);
|
||||
if (csinfo[i].ppath != NULL) {
|
||||
(void)smsg("%2zu %-5" PRId64 " %-34s %-32s", i,
|
||||
(int64_t)csinfo[i].pid, csinfo[i].fname, csinfo[i].ppath);
|
||||
} else {
|
||||
(void)smsg("%2zu %-5" PRId64 " %-34s <none>", i,
|
||||
(int64_t)csinfo[i].pid, csinfo[i].fname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user