summaryrefslogtreecommitdiff
path: root/hook.c
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-03-11 21:46:58 -0300
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-07-02 19:04:52 -0300
commita2c47d3487aaf4667926195ba3f5b05b94626daf (patch)
treeb41f7989704e17c4687e4e7b3ba43a61864a38ba /hook.c
parenta1949714b99a502a57b3dd7a99e619c10211d9fc (diff)
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.
Diffstat (limited to 'hook.c')
-rw-r--r--hook.c5
1 files changed, 2 insertions, 3 deletions
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);