diff options
| author | Marcus Boerger <helly@php.net> | 2003-06-01 16:20:23 +0000 |
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2003-06-01 16:20:23 +0000 |
| commit | 53dae40d5a624dcb052f4b166e7be2ea63e373c9 (patch) | |
| tree | 44242dce5211755942dac66d62dbb21919f5a8ca /Zend/zend_constants.c | |
| parent | 26e7420615a722e73264d3d3d29ce96789ef700a (diff) | |
| download | php-git-53dae40d5a624dcb052f4b166e7be2ea63e373c9.tar.gz | |
Do it correct always
Diffstat (limited to 'Zend/zend_constants.c')
| -rw-r--r-- | Zend/zend_constants.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c index a49df752b7..10995a8084 100644 --- a/Zend/zend_constants.c +++ b/Zend/zend_constants.c @@ -244,12 +244,12 @@ ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC) printf("Registering constant for module %d\n", c->module_number); #endif - /* keep in mind that c->name_len already contains the '\0' */ - lowercase_name = do_alloca(c->name_len); - if (!(c->flags & CONST_CS)) { + /* keep in mind that c->name_len already contains the '\0' */ + lowercase_name = do_alloca(c->name_len); zend_str_tolower_copy(lowercase_name, c->name, c->name_len - 1); } else { + lowercase_name = do_alloca(c->name_len + 1); memcpy(lowercase_name, c->name, c->name_len); lowercase_name[c->name_len] = '\0'; } |
