diff options
author | fcolin | 2009-11-09 10:25:50 +0000 |
---|---|---|
committer | fcolin | 2009-11-09 10:25:50 +0000 |
commit | f33cc936d56a5a004f9c9a40a6ff73a7635aca45 (patch) | |
tree | ede0747155b1931b10b61a1b3dea008c2715af65 /src/ivy.c | |
parent | 39a17f46065f26c1056a9cb4e3f9a6fdf18bba41 (diff) | |
download | ivy-c-f33cc936d56a5a004f9c9a40a6ff73a7635aca45.zip ivy-c-f33cc936d56a5a004f9c9a40a6ff73a7635aca45.tar.gz ivy-c-f33cc936d56a5a004f9c9a40a6ff73a7635aca45.tar.bz2 ivy-c-f33cc936d56a5a004f9c9a40a6ff73a7635aca45.tar.xz |
coorection plantage si erreur de compile exp reguliere
Diffstat (limited to 'src/ivy.c')
-rw-r--r-- | src/ivy.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1560,6 +1560,7 @@ static void addRegexpToDictionary (const char* regexp, IvyClientPtr client) { MsgSndDictPtr msgSendDict = NULL; RWIvyClientPtr newClient = NULL; + static char errorbuffer[1024]; /* on cherche si une entrée existe deja pour cette regexp source */ HASH_FIND_STR(messSndByRegexp, regexp, msgSendDict); /* l'entree n'existe pas dans le dictionnaire : on la cree */ @@ -1572,8 +1573,9 @@ static void addRegexpToDictionary (const char* regexp, IvyClientPtr client) msgSendDict->binding = IvyBindingCompile(regexp, & erroffset, & errbuf ); if (msgSendDict->binding == NULL ) { - printf("Error compiling '%s', %s\n", regexp, errbuf); - MsgSendTo(client, Error, erroffset, errbuf ); + sprintf( errorbuffer, "Error compiling '%s', %s", regexp, errbuf); + printf("%s\n", errorbuffer); + MsgSendTo(client, Error, erroffset, errorbuffer ); } msgSendDict->clientList = NULL; |