Fix issue #1545
diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php
index 67bb040..691247f 100644
--- a/system/database/drivers/oci8/oci8_driver.php
+++ b/system/database/drivers/oci8/oci8_driver.php
@@ -158,6 +158,8 @@
 		$this->dsn = '';
 	}
 
+	// --------------------------------------------------------------------
+
 	/**
 	 * Non-persistent database connection
 	 *
@@ -179,9 +181,9 @@
 	 */
 	public function db_pconnect()
 	{
-		return ( ! empty($this->char_set))
-			? @oci_pconnect($this->username, $this->password, $this->dsn, $this->char_set)
-			: @oci_pconnect($this->username, $this->password, $this->dsn);
+		return empty($this->char_set)
+			? @oci_pconnect($this->username, $this->password, $this->dsn)
+			: @oci_pconnect($this->username, $this->password, $this->dsn, $this->char_set);
 	}
 
 	// --------------------------------------------------------------------
@@ -217,6 +219,8 @@
 		return @oci_execute($this->stmt_id, $this->commit_mode);
 	}
 
+	// --------------------------------------------------------------------
+
 	/**
 	 * Generate a statement ID
 	 *
@@ -236,7 +240,7 @@
 	/**
 	 * Get cursor. Returns a cursor from the database
 	 *
-	 * @return	cursor id
+	 * @return	resource
 	 */
 	public function get_cursor()
 	{
@@ -300,6 +304,7 @@
 	/**
 	 * Bind parameters
 	 *
+	 * @param	array
 	 * @return	void
 	 */
 	protected function _bind_params($params)
@@ -328,6 +333,7 @@
 	/**
 	 * Begin Transaction
 	 *
+	 * @param	bool
 	 * @return	bool
 	 */
 	public function trans_begin($test_mode = FALSE)
@@ -636,8 +642,8 @@
 	protected function _limit($sql, $limit, $offset)
 	{
 		$this->limit_used = TRUE;
-		return 'SELECT * FROM (SELECT inner_query.*, rownum rnum FROM ('.$sql.') inner_query WHERE rownum < '.($offset + $limit).')'
-			.($offset ? ' WHERE rnum >= '.$offset : '');
+		return 'SELECT * FROM (SELECT inner_query.*, rownum rnum FROM ('.$sql.') inner_query WHERE rownum < '.($offset + $limit + 1).')'
+			.($offset ? ' WHERE rnum >= '.($offset + 1): '');
 	}
 
 	// --------------------------------------------------------------------