public
/
ack.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
671556c
)
fixed small bug
author
eck
<none@none>
Mon, 27 Nov 1989 11:40:58 +0000
(11:40 +0000)
committer
eck
<none@none>
Mon, 27 Nov 1989 11:40:58 +0000
(11:40 +0000)
lang/cem/cpp.ansi/domacro.c
patch
|
blob
|
history
lang/cem/cpp.ansi/replace.c
patch
|
blob
|
history
diff --git
a/lang/cem/cpp.ansi/domacro.c
b/lang/cem/cpp.ansi/domacro.c
index
da5f519
..
012b936
100644
(file)
--- a/
lang/cem/cpp.ansi/domacro.c
+++ b/
lang/cem/cpp.ansi/domacro.c
@@
-639,6
+639,7
@@
get_text(formals, length)
c = GetChar();
repl->r_ptr = repl->r_text = Malloc(repl->r_size = ITEXTSIZE);
+ *repl->r_ptr = '\0';
while ((c != EOI) && (class(c) != STNL)) {
if (BLANK(c)) {
if (!blank++) add2repl(repl, ' ');
diff --git
a/lang/cem/cpp.ansi/replace.c
b/lang/cem/cpp.ansi/replace.c
index
418f8e7
..
5b2719c
100644
(file)
--- a/
lang/cem/cpp.ansi/replace.c
+++ b/
lang/cem/cpp.ansi/replace.c
@@
-537,6
+537,7
@@
macro2buffer(repl, idf, args)
int err = 0;
char *stringify();
+ assert(ptr[idf->id_macro->mc_length] == '\0');
while (*ptr) {
if (*ptr == '\'' || *ptr == '"') {
register int delim = *ptr;