projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5345f92
)
Correct checking for well known functions: Properly check for __builtin_ prefix.
author
Christoph Mallon
<christoph.mallon@gmx.de>
Wed, 14 Sep 2011 07:20:14 +0000
(09:20 +0200)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Wed, 14 Sep 2011 07:20:14 +0000
(09:20 +0200)
The code checked for _..uiltin_ (. being arbitrary chars) or even crashed on strings shorter than 3 chars.
builtins.c
patch
|
blob
|
history
diff --git
a/builtins.c
b/builtins.c
index
d15a982
..
924b14f
100644
(file)
--- a/
builtins.c
+++ b/
builtins.c
@@
-234,7
+234,7
@@
void adapt_special_functions(function_t *function)
/* Disregard prefix _, __, __x or __builtin_. */
if (name[0] == '_') {
- if (!strncmp(name +
3, "uiltin_", 7
))
+ if (!strncmp(name +
1, "_builtin_", 9
))
name += 10;
else if (name[1] == '_' && name[2] == 'x')
name += 3;