}
}
- if (*(buffer + linelen - 1) != '\n') {
+ if (*(buffer + linelen - 1) != '\n' || !linelen) {
phpdbg_out("\n");
}
}
dataptr->line[++line] = (uint)(bufptr - data.buf) + 1;
}
}
- dataptr = erealloc(dataptr, sizeof(phpdbg_file_source) + sizeof(uint) * line);
dataptr->lines = ++line;
+ dataptr->line[line] = endptr - data.buf;
+ dataptr = erealloc(dataptr, sizeof(phpdbg_file_source) + sizeof(uint) * line);
ret = PHPDBG_G(compile_file)(&fake, type TSRMLS_CC);