# # patch "ChangeLog" # from [82f8ca03bb8bebf71c86d23e495b8de4ea0b1afc] # to [a1d75a1938a57a50148a7f00317136989de76705] # # patch "diff_patch.cc" # from [e798174667fdbb10359025f4b050b0b1c017705c] # to [c080a1bd6428d24243c0fc224414be6eb0fb7949] # --- ChangeLog +++ ChangeLog @@ -1,3 +1,8 @@ +2005-04-15 Olivier Andrieu + + * diff_patch.cc(guess_binary): do not use '\x00' as first + character of a C string ... + 2005-04-14 Matthew Gregan * win32/process.cc: Fix build on MingW 3.2.0-rc[123] by adding @@ -2733,7 +2738,7 @@ * AUTHORS: Mention Wojciech and Neil. * revision.cc (calculate_ancestors_from_graph): Make non-recursive. -2005-01-17 Wojciech Miłkowski +2005-01-17 Wojciech Miłkowski * std_hooks.lua: Teach about meld. --- diff_patch.cc +++ diff_patch.cc @@ -25,7 +25,8 @@ { // these do not occur in ASCII text files // FIXME: this heuristic is (a) crap and (b) hardcoded. fix both these. - if (s.find_first_of("\x00\x01\x02\x03\x04\x05\x06\x0e\x0f" + if (s.find_first_of('\x00') != string::npos || + s.find_first_of("\x01\x02\x03\x04\x05\x06\x0e\x0f" "\x10\x11\x12\x13\x14\x15\x16\x17\x18" "\x19\x1a\x1c\x1d\x1e\x1f") != string::npos) return true;