178326 - Last tab on the right of CTabFolder draws badly.
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java
index e6e33c4..a9bbe48 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java
@@ -501,11 +501,14 @@
 
 	int[] shape = null;
 	int rightEdge = Math.min(x + width, parent.getRightItemEdge());
+
 	if (this.parent.onBottom) {
-		int[] left = parent.simple ? CTabFolder.SIMPLE_BOTTOM_LEFT_CORNER
-				: CTabFolder.BOTTOM_LEFT_CORNER;
-		int[] right = parent.simple ? CTabFolder.SIMPLE_BOTTOM_RIGHT_CORNER
-				: CTabFolder.BOTTOM_RIGHT_CORNER;
+		int[] left = parent.simple
+			? CTabFolder.SIMPLE_BOTTOM_LEFT_CORNER
+			: CTabFolder.BOTTOM_LEFT_CORNER;
+		int[] right = parent.simple
+			? CTabFolder.SIMPLE_BOTTOM_RIGHT_CORNER
+			: CTabFolder.BOTTOM_RIGHT_CORNER;
 		if (parent.borderLeft == 0
 				&& parent.indexOf(this) == parent.firstIndex) {
 			left = new int[] { x, y + height };
@@ -534,13 +537,10 @@
 				+ parent.curveWidth - parent.curveIndent;
 		shape[index++] = y - 1;
 	} else {
-		int[] right = parent.simple ? CTabFolder.SIMPLE_TOP_RIGHT_CORNER
-				: CTabFolder.TOP_RIGHT_CORNER;
-
-		if (parent.borderRight == 0
-				&& parent.indexOf(this) == parent.items.length - 1) {
-			right = new int[] { x, y };
-		}
+		int[] right = parent.simple
+			? CTabFolder.SIMPLE_TOP_RIGHT_CORNER
+			: CTabFolder.TOP_RIGHT_CORNER;
+		
 		shape = new int[right.length + 4];
 		int index = 0;