projects
/
m6w6
/
ext-psi
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
| inline |
side by side
(parent:
b0fdc1f
)
fix token concatenation
author
Michael Wallner
<mike@php.net>
Wed, 31 Oct 2018 10:11:15 +0000
(11:11 +0100)
committer
Michael Wallner
<mike@php.net>
Wed, 31 Oct 2018 10:11:15 +0000
(11:11 +0100)
src/token.c
patch
|
blob
|
history
diff --git
a/src/token.c
b/src/token.c
index 29dcb42657497bc1732bfa358f02d615c424324e..df7d2e8592905062cd82ae1025e5fdbc0a5350e8 100644
(file)
--- a/
src/token.c
+++ b/
src/token.c
@@
-91,13
+91,12
@@
struct psi_token *psi_token_cat(const char *sep, unsigned argc, ...) {
T->type = PSI_T_NAME;
T->file = zend_string_copy(T->file);
+ smart_str_append_ex(&text, T->text, 1);
+
for (i = 1; i < argc; ++i) {
struct psi_token *arg = va_arg(argv, struct psi_token *);
- if (sep_len && text.a) {
- smart_str_appendl_ex(&text, sep, sep_len, 1);
- }
-
+ smart_str_appendl_ex(&text, sep, sep_len, 1);
smart_str_append_ex(&text, arg->text, 1);
}
va_end(argv);