Fixed prefix and suffix in pagination. Fixes #677
diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php
index 23ca549..2fe4cf3 100644
--- a/system/libraries/Pagination.php
+++ b/system/libraries/Pagination.php
@@ -142,6 +142,11 @@
 		// Determine the current page number.
 		$CI =& get_instance();
 
+		if ($this->prefix != '' OR $this->suffix != '')
+		{
+			$this->cur_page = str_replace(array($this->prefix, $this->suffix), '', $CI->uri->segment($this->uri_segment));
+		}
+
 		if ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE)
 		{
 			if ($CI->input->get($this->query_string_segment) != $base_page)