diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-03-11 21:46:58 -0300 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-07-02 19:04:52 -0300 |
commit | a2c47d3487aaf4667926195ba3f5b05b94626daf (patch) | |
tree | b41f7989704e17c4687e4e7b3ba43a61864a38ba /hook.c | |
parent | a1949714b99a502a57b3dd7a99e619c10211d9fc (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.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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); |