updated for version 7.0150
diff --git a/src/diff.c b/src/diff.c
index b6f936e..1a382e3 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -1905,7 +1905,10 @@
     {
 	/* No argument: Find the other buffer in the list of diff buffers. */
 	for (idx_other = 0; idx_other < DB_COUNT; ++idx_other)
-	    if (diffbuf[idx_other] != curbuf && diffbuf[idx_other] != NULL)
+	    if (diffbuf[idx_other] != curbuf
+		    && diffbuf[idx_other] != NULL
+		    && (eap->cmdidx != CMD_diffput
+					       || diffbuf[idx_other]->b_p_ma))
 		break;
 	if (idx_other == DB_COUNT)
 	{
@@ -1915,7 +1918,9 @@
 
 	/* Check that there isn't a third buffer in the list */
 	for (i = idx_other + 1; i < DB_COUNT; ++i)
-	    if (diffbuf[i] != curbuf && diffbuf[i] != NULL)
+	    if (diffbuf[i] != curbuf
+		    && diffbuf[i] != NULL
+		    && (eap->cmdidx != CMD_diffput || diffbuf[i]->b_p_ma))
 	    {
 		EMSG(_("E101: More than two buffers in diff mode, don't know which one to use"));
 		return;