work = mymalloc(len);
count = i_ft2_has_chars(handle, text, len, utf8, work);
if (GIMME_V == G_ARRAY) {
- EXTEND(SP, count);
- for (i = 0; i < count; ++i) {
- PUSHs(boolSV(work[i]));
- }
+ if (count) {
+ EXTEND(SP, count);
+ for (i = 0; i < count; ++i) {
+ PUSHs(boolSV(work[i]));
+ }
+ }
}
else {
EXTEND(SP, 1);