You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2012/11/22 01:52:38 UTC

svn commit: r1412397 - /subversion/trunk/subversion/libsvn_diff/diff_memory.c

Author: julianfoad
Date: Thu Nov 22 00:52:37 2012
New Revision: 1412397

URL: http://svn.apache.org/viewvc?rev=1412397&view=rev
Log:
Fix one of the two or three bugs in r1412382. This one caused diff-diff3-tests 1
and 3 to fail.

* subversion/libsvn_diff/diff_memory.c
  (svn_diff_mem_string_output_unified2): Cope with hunk_delimiter being NULL.

Modified:
    subversion/trunk/subversion/libsvn_diff/diff_memory.c

Modified: subversion/trunk/subversion/libsvn_diff/diff_memory.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_diff/diff_memory.c?rev=1412397&r1=1412396&r2=1412397&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_diff/diff_memory.c (original)
+++ subversion/trunk/subversion/libsvn_diff/diff_memory.c Thu Nov 22 00:52:37 2012
@@ -562,7 +562,7 @@ svn_diff_mem_string_output_unified2(svn_
       baton.hunk = svn_stringbuf_create_empty(pool);
       baton.hunk_delimiter = hunk_delimiter;
       baton.no_newline_string
-        = (strcmp(hunk_delimiter, "##") != 0)
+        = (hunk_delimiter != NULL && strcmp(hunk_delimiter, "##") != 0)
           ? APR_EOL_STR SVN_DIFF__NO_NEWLINE_AT_END_OF_FILE APR_EOL_STR
           : APR_EOL_STR SVN_DIFF__NO_NEWLINE_AT_END_OF_PROPERTY APR_EOL_STR;