com php-src: Fix regression in list It showed the entire remaining file before...: phpdbg_list.c

From: Date: Thu, 09 Oct 2014 09:52:57 +0000
Subject: com php-src: Fix regression in list It showed the entire remaining file before...: phpdbg_list.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-82592@lists.php.net to get a copy of this message
Commit: b426897c9c55b441f89fefab4a87acdbbe989241 Author: Bob Weinand <bobwei9@hotmail.com> Thu, 9 Oct 2014 11:52:57 +0200 Parents: 96de7c4b0ad30ad41983fa0786aeaf0418d82c7b Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b426897c9c55b441f89fefab4a87acdbbe989241 Log: Fix regression in list It showed the entire remaining file before... Changed paths: M phpdbg_list.c Diff: diff --git a/phpdbg_list.c b/phpdbg_list.c index 647a290...83c27bc 100644 --- a/phpdbg_list.c +++ b/phpdbg_list.c @@ -153,12 +153,12 @@ void phpdbg_list_file(const char *filename, uint count, uint offset, uint highli char *buffer = (*data)->buf + linestart; if (!highlight) { - phpdbg_write("line", "line=\"%u\" code=\"%s\"", " %05u: %s", line, buffer); + phpdbg_write("line", "line=\"%u\" code=\"%.*s\"", " %05u: %.*s", line, linelen, buffer); } else { if (highlight != line) { - phpdbg_write("line", "line=\"%u\" code=\"%s\"", " %05u: %s", line, buffer); + phpdbg_write("line", "line=\"%u\" code=\"%.*s\"", " %05u: %.*s", line, linelen, buffer); } else { - phpdbg_write("line", "line=\"%u\" code=\"%s\" current=\"current\"", ">%05u: %s", line, buffer); + phpdbg_write("line", "line=\"%u\" code=\"%.*s\" current=\"current\"", ">%05u: %.*s", line, linelen, buffer); } }

« previous php.cvs (#82592) next »