From 6b99ec44dddb17696825702fecbbf28c5c758e43 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Sun, 7 Nov 2004 03:30:45 +0000 Subject: more character escaping for attribute editor made queue length longer and added overflow checks reoccuring fix.... svn path=/trunk/; revision=2231 --- externals/grill/flext/source/flattr_ed.cpp | 3 ++- externals/grill/flext/source/flqueue.cpp | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'externals/grill/flext/source') diff --git a/externals/grill/flext/source/flattr_ed.cpp b/externals/grill/flext/source/flattr_ed.cpp index cbc7f08c..941465cc 100644 --- a/externals/grill/flext/source/flattr_ed.cpp +++ b/externals/grill/flext/source/flattr_ed.cpp @@ -427,7 +427,8 @@ void flext_base::SetAttrEditor(t_classid c) static size_t escapeit(char *dst,size_t maxlen,const char *src) { int ret = 0; - for(char *d = dst; *src && (d-dst) < (int)maxlen; ++src) { + char *d; + for(d = dst; *src && (d-dst) < (int)maxlen; ++src) { if(*src == '%') *(d++) = '%',*(d++) = '%'; else diff --git a/externals/grill/flext/source/flqueue.cpp b/externals/grill/flext/source/flqueue.cpp index d3bc9a13..37769c17 100755 --- a/externals/grill/flext/source/flqueue.cpp +++ b/externals/grill/flext/source/flqueue.cpp @@ -26,7 +26,7 @@ flext::thrid_t flext::thrmsgid = 0; #endif -#define QUEUE_LENGTH 256 +#define QUEUE_LENGTH 512 #define QUEUE_ATOMS 1024 class qmsg @@ -146,13 +146,13 @@ protected: // must return contiguous region t_atom *GetAtoms(int argc) { - // \todo check for available space - if(atail+argc >= QUEUE_ATOMS) { + FLEXT_ASSERT(ahead > argc); atail = argc; return atoms; } else { + FLEXT_ASSERT(ahead <= atail || ahead > atail+argc); t_atom *at = atoms+atail; atail += argc; return at; -- cgit v1.2.1