Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.inc |
— | — | @@ -301,7 +301,7 @@ |
302 | 302 | $uncompleted_square_brackets = 0; |
303 | 303 | $uncompleted_curly_brackets = 2; |
304 | 304 | $template_ended = false; |
305 | | - for ($i = $fields_start_char; ! $template_ended && ($i <= strlen($existing_page_content)); $i++) { |
| 305 | + for ($i = $fields_start_char; ! $template_ended && ($i < strlen($existing_page_content)); $i++) { |
306 | 306 | $c = $existing_page_content[$i]; |
307 | 307 | // handle an end to a field and/or template declaration |
308 | 308 | $template_ended = ($uncompleted_curly_brackets == 0 && $uncompleted_square_brackets == 0); |