From 4755e2594d80d7b446db44e4001b0081ac14e1ae Mon Sep 17 00:00:00 2001 From: terminx Date: Sat, 9 Aug 2008 05:13:13 +0000 Subject: [PATCH] git-svn-id: https://svn.eduke32.com/eduke32@945 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/src/build.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/polymer/build/src/build.c b/polymer/build/src/build.c index 75b4501e6..bb78e4ba4 100644 --- a/polymer/build/src/build.c +++ b/polymer/build/src/build.c @@ -6896,17 +6896,15 @@ int menuselect_pk(int direction) // 20080104: jump to next (direction!=0) or pre int menuselect(void) { - static int listsize; + int listsize = (ydim16-32)/8; int i; - char ch, buffer[78], /*PK*/ *chptr; + char ch, buffer[96], /*PK*/ *chptr; static char oldpath[BMAX_PATH]; CACHE1D_FIND_REC *dir; int bakpathsearchmode = pathsearchmode; g_oldpath=oldpath; //PK: need it in menuselect_pk - listsize = (ydim16-32)/8; - Bstrcpy(selectedboardfilename, oldpath); if (pathsearchmode) Bcanonicalisefilename(selectedboardfilename, 1); // clips off the last token and compresses relative path @@ -6944,7 +6942,7 @@ int menuselect(void) } printext16(halfxdim16-(8*strlen(buffer)/2), 4, 12,0,buffer,0); - Bsnprintf(buffer,78,"(%d dirs, %d files) %s",numdirs,numfiles,selectedboardfilename); + Bsnprintf(buffer,sizeof(buffer)-1,"(%d dirs, %d files) %s",numdirs,numfiles,selectedboardfilename); buffer[sizeof(buffer)-1] = 0; printext16(1,ydim16-8-1,8,0,buffer,0);