From c5837dafeff5d89a7daa7847771e094e08eac8aa Mon Sep 17 00:00:00 2001
From: the_systech <the_systech@users.sourceforge.net>
Date: Mon, 8 Apr 2002 15:36:17 +0000
Subject: [PATCH] Ok one more try at this one...

git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@2520 89ea8834-ac86-4346-8a33-228a782c2dd0
---
 phpBB/includes/bbcode.php | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
index 180cb69058..9001822ccc 100644
--- a/phpBB/includes/bbcode.php
+++ b/phpBB/includes/bbcode.php
@@ -433,7 +433,13 @@ function bbencode_first_pass_pda($text, $uid, $open_tag, $close_tag, $close_tag_
 				// Push its position, the text we matched, and its index in the open_tag array on to the stack, and then keep going to the right.
 				$match = array("pos" => $curr_pos, "tag" => $which_start_tag, "index" => $start_tag_index);
 				bbcode_array_push($stack, $match);
-				++$curr_pos;
+				//
+            // Rather than just increment $curr_pos
+            // Set it to the ending of the tag we just found
+            // Keeps error in nested tag from breaking out
+            // of table structure..
+            //
+            $curr_pos = curr_pos + strlen($possible_start);	
 			}
 			else
 			{