Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15482/src
Modified Files: Tag: devel_0_38 s_inter.c Log Message: check for too long GUI string and print error to the console
Index: s_inter.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_inter.c,v retrieving revision 1.5.4.1 retrieving revision 1.5.4.2 diff -C2 -d -r1.5.4.1 -r1.5.4.2 *** s_inter.c 5 Nov 2004 14:27:47 -0000 1.5.4.1 --- s_inter.c 8 Nov 2004 17:54:42 -0000 1.5.4.2 *************** *** 642,645 **** --- 642,650 ---- sys_guibufsize - sys_guibufhead, fmt, ap); va_end(ap); + if(msglen < 0) + { + fprintf(stderr, "Pd: buffer space wasn't sufficient for long GUI string\n"); + return; + } if (msglen >= sys_guibufsize - sys_guibufhead) { *************** *** 652,659 **** sys_guibufsize - sys_guibufhead, fmt, ap); va_end(ap); ! if (msglen2 != msglen) ! bug("sys_vgui"); ! if (msglen >= sys_guibufsize - sys_guibufhead) ! msglen = sys_guibufsize - sys_guibufhead; } if (sys_debuglevel & DEBUG_MESSUP) --- 657,664 ---- sys_guibufsize - sys_guibufhead, fmt, ap); va_end(ap); ! if (msglen2 != msglen) ! bug("sys_vgui"); ! if (msglen >= sys_guibufsize - sys_guibufhead) ! msglen = sys_guibufsize - sys_guibufhead; } if (sys_debuglevel & DEBUG_MESSUP)