From: x2003bruneau Date: Wed, 27 Sep 2006 14:08:17 +0000 (+0000) Subject: Small fix in debug mode X-Git-Tag: xorg/0.9.12~245 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=9630c6499236b38c5a27f882d5c888aaf20f00b6;p=platal.git Small fix in debug mode git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@919 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/classes/XDB.php b/classes/XDB.php index 299f468..70b1f24 100644 --- a/classes/XDB.php +++ b/classes/XDB.php @@ -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, ')')); }