From: Neil H. <nh...@us...> - 2014-04-15 16:12:19
|
Update of /cvsroot/cscope/cscope/src In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv22982/src Modified Files: find.c Log Message: Ensure that putpostingref has non-empty string putpostingref may end up with an empty string in its function array, leading to bad formatting in the display. This patch makes sure that we have a valid string in said funtion array fixes https://sourceforge.net/p/cscope/bugs/200/ Signed-off-by: Neil Horman <nh...@tu...> Index: find.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/find.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** find.c 15 Jun 2012 11:18:11 -0000 1.25 --- find.c 15 Apr 2014 16:12:15 -0000 1.26 *************** *** 1202,1206 **** putpostingref(POSTING *p, char *pat) { ! static char function[PATLEN + 1]; /* function name */ if (p->fcnoffset == 0) { --- 1202,1208 ---- putpostingref(POSTING *p, char *pat) { ! // initialize function to "unknown" so that the first line of temp1 ! // is properly formed if symbol matches a header file entry first time ! static char function[PATLEN + 1] = "unknown";/* function name */ if (p->fcnoffset == 0) { |