From a2c47d3487aaf4667926195ba3f5b05b94626daf Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Tue, 11 Mar 2008 21:46:58 -0300 Subject: Fix several generic bugs including: o Several memory read/write errors. o Implement smarter XeditPrintf that will show how many times a text has been printed. o Check all arguments to XeditPrintf to ensure the '%' character cannot be sent to it. o Some minor reindentation to code that still had the original 2 spaces indentation. --- hook.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'hook.c') diff --git a/hook.c b/hook.c index 913ccc3..87f0da6 100644 --- a/hook.c +++ b/hook.c @@ -1098,7 +1098,7 @@ print: reerror(ecode, &einfo.regex, buffer + length, sizeof(buffer) - length - 2); strcat(buffer, "\n"); - XeditPrintf(buffer); + XeditPrintf("%s", buffer); refree(&einfo.regex); einfo.state = SubstituteDisabled; Feep(); @@ -1159,8 +1159,7 @@ fail: ptr = "Unknown error"; break; } - XmuSnprintf(buffer, sizeof(buffer), "Error: %s.\n", ptr); - XeditPrintf(buffer); + XeditPrintf("Error: %s.\n", ptr); } if (redisplay) XawTextEnableRedisplay(w); -- cgit v1.2.3