Small fix in debug mode
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Wed, 27 Sep 2006 14:08:17 +0000 (14:08 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Wed, 27 Sep 2006 14:08:17 +0000 (14:08 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@919 839d8a87-29fc-0310-9880-83ba4fa771e5

classes/XDB.php

index 299f468..70b1f24 100644 (file)
@@ -51,7 +51,7 @@ class XDB
         $res = '';
         foreach ($query as $array) {
             list($line, $local) = $array;
-            $local   = $length - $local;
+            $local   = max(0, $length - $local);
             $res    .= str_repeat(' ', $local) . $line . "\n";
             $length += 2 * (substr_count($line, '(') - substr_count($line, ')'));
         }