Re: Segmentation Fault
| From: | Christoph Muehlmann | Date: | Tue, 29 Jan 2002 23:10:29 +0000 |
| Subject: | Re: Segmentation Fault | ||
| References: | 1 2 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-1070@lists.php.net to get a copy of this message | ||
Am 2002.01.29 21:42:12 +0100 schrieb(en) Markus Fischer:
Two bugs actually. One in your code (you're putting 9 data
columns in a clist which only has 8) and the second in
php-gtk which doesn't check for the proper number of elements
passed to gtk_clist_append. It's fixed in CVS now.
the first Bug was wrong coding, my second (which occured afer
correcting the first) was a division through zero. The following
code will work (lines 83-96):
for ($l = 1; $l < count($lines)-1; $l++) {
$line = explode(" ", $lines[$l]);
$lst->append(array(
$line[6],
$this->gdf_bytes($line[2]*1024),
(round($line[3]*1000/$line[2])/10)."%",
$this->gdf_bytes($line[3]*1024),
(round($line[4]*1000/$line[2])/10)."%",
$this->gdf_bytes($line[4]*1024),
$line[0],
$this->gdf_get_fs($line[1])
));
//echo "<td colspan=6>".percentimage(round($line[3]*100/$line[2]), true)."</td>";
}