“Compare with previous” link is broken in websvn

The bug:

http://websvn.tigris.org/issues/show_bug.cgi?id=20

Read more for a simple patch.

--- listing.php.old 2007-10-01 17:12:47.000000000 +0200
+++ listing.php 2007-10-01 17:13:18.000000000 +0200
@@ -293,8 +293,7 @@
createDirLinks($rep, $ppath, $passrev, $showchanged);
$vars["curdirloglink"] = "<a href=\"${logurl}rev=$passrev&amp;sc=$showchanged&amp;isdir=1\">${lang["VIEWLOG"]}</a>";
if (isset($history[1])) {
-       $vars["curdircomplink"] = "<a href=\"${compurl}compare%5B%5D=".urlencode($history[1]["path"])."@".$history[1]["rev"]."&amp;compare%5B%5D=".urlencode($history[0]["path"])."@".$history[0]["rev"]."\">${lang["DIFFPREV"]}</a>";
-       $vars["curdircomplink"] = "<a href=\"${compurl}compare%5B%5D=".urlencode($history[1]["path"])."@".$history[1]["rev"]."&amp;compare%5B%5D=".urlencode($history[0]["path"])."@".$history[0]["rev"]."\">${lang["DIFFPREV"]}</a>";
+       $vars["curdircomplink"] = "<a href=\"${compurl}compare%5B%5D=".urlencode($history[1]["path"])."@".($passrev-1)."&amp;compare%5B%5D=".urlencode($history[0]["path"])."@".$passrev."\">${lang["DIFFPREV"]}</a>";
} else
$vars["curdircomplink"] = "";

#subversion