Module: tools Branch: master Commit: 9032ef91ac26ca47ac23e6da786629b5df42af03 URL: http://source.winehq.org/git/tools.git/?a=commit;h=9032ef91ac26ca47ac23e6da7...
Author: Mikolaj Zalewski mikolajz@tygrys.dom Date: Wed Mar 19 23:14:33 2008 +0100
small bugfixes
---
php/lib_res.php | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/php/lib_res.php b/php/lib_res.php index 92fb274..441d27b 100644 --- a/php/lib_res.php +++ b/php/lib_res.php @@ -273,7 +273,7 @@ class StringTable extends Resource $extra = " style="background-color: #ffb8d0""; }
- echo "<tr$extra><td valign="top">".(($this->table_id-1)*16+$i)."</td><td></td>"; + echo "<tr$extra><td valign="top">".(($this->table_id-1)*16+$i)."</td><td> </td>"; echo "<td>";
dump_unicode_or_empty($uni_str); @@ -392,7 +392,7 @@ class MenuResource extends Resource }
/* backtrack (produces results in reverse order) */ - $out = array_fill(0, $end, 3); + $out = ($end > 0 ? array_fill(0, $end, 3) : array()); $i = count($this->items) - $start - $end; $j = count($res2->items) - $start - $end; while ($i > 0 || $j > 0) { @@ -417,7 +417,8 @@ class MenuResource extends Resource if ($step & 2) $j--; } - $out += array_fill(count($out), $start, 3); + if ($start > 0) + $out += array_fill(count($out), $start, 3); return array_reverse($out); }
@@ -491,8 +492,8 @@ class MenuResource extends Resource $extra = " style="background-color: #ffb8d0""; }
- $id = ($show[$i] & 1 ? $this->items[$pos]["id"] : $master_res->items[$pos]["id"]); - echo "<tr$extra><td valign="top">$id</td><td></td>"; + $id = ($show[$i] & 1 ? $this->items[$pos]["id"] : $master_res->items[$master_pos]["id"]); + echo "<tr$extra><td valign="top">$id</td><td> </td>"; echo "<td>";
if ($show[$i] & 1)