aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-04-10 20:56:01 -0400
committerJustin M. Keyes <justinkz@gmail.com>2016-04-10 20:56:01 -0400
commitc56aceff88a3a63d8d7ac53dc0550bb8a839a8cf (patch)
tree421fbc476701e5f2b9b20de710b36c2ef01d35a3
parent91c5005da82e6f9ab6bb2f46b27cb82b188b0391 (diff)
parent80471df2089201e9bac852cda7d46a04e18e0e5a (diff)
downloadrneovim-c56aceff88a3a63d8d7ac53dc0550bb8a839a8cf.tar.gz
rneovim-c56aceff88a3a63d8d7ac53dc0550bb8a839a8cf.tar.bz2
rneovim-c56aceff88a3a63d8d7ac53dc0550bb8a839a8cf.zip
Merge pull request #4557 from mikewadsten/bugfix/issue-4537-cscope-segfault
cscope: Fix mismatched types in ':cscope show' output
-rw-r--r--src/nvim/if_cscope.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/nvim/if_cscope.c b/src/nvim/if_cscope.c
index 7169a1d963..a143490356 100644
--- a/src/nvim/if_cscope.c
+++ b/src/nvim/if_cscope.c
@@ -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);
+ }
}
}