From 4cdbde3775be5c961d11bb5497d1c97e07c429b2 Mon Sep 17 00:00:00 2001 From: fcolin Date: Fri, 16 Jun 2006 14:36:22 +0000 Subject: correction d'un BUG dans IvyGetMessages ( si nb > 200 ) ajout d'un argument -f a ivyprobe pour passer des regexps dans un fichier --- src/ivy.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/ivy.c') diff --git a/src/ivy.c b/src/ivy.c index 5f5a93c..e0102c8 100644 --- a/src/ivy.c +++ b/src/ivy.c @@ -860,7 +860,8 @@ char *IvyGetApplicationList(const char *sep) char **IvyGetApplicationMessages( IvyClientPtr app ) { - static char *messagelist[200];/* TODO remove that ugly Thing */ +#define MAX_REGEXP 4096 + static char *messagelist[MAX_REGEXP+1];/* TODO remove that ugly Thing */ MsgSndPtr msg; int msgCount= 0; memset( messagelist, 0 , sizeof( messagelist )); @@ -868,6 +869,11 @@ char **IvyGetApplicationMessages( IvyClientPtr app ) IVY_LIST_EACH( app->msg_send, msg ) { messagelist[msgCount++]= msg->str_regexp; + if ( msgCount >= MAX_REGEXP ) + { + fprintf(stderr,"Too Much expression(%d) for buffer\n",msgCount); + break; + } } return messagelist; } -- cgit v1.1