Logic reversal for last_char_is
diff --git a/tar.c b/tar.c
index 716f4ac..c168564 100644
--- a/tar.c
+++ b/tar.c
@@ -706,7 +706,7 @@
 			case REGTYPE0:
 				/* If the name ends in a '/' then assume it is
 				 * supposed to be a directory, and fall through */
-				if (last_char_is(header.name,'/')) {
+				if (!last_char_is(header.name,'/')) {
 					if (tarExtractRegularFile(&header, extractFlag, tostdoutFlag)==FALSE)
 						errorFlag=TRUE;
 					break;