# # patch "ChangeLog" # from [08edad29c22077ab1880b0472c28ff9b719b5ba2] # to [c18a2745c60d8ed60f2c85417fb212cf7c8cc4af] # # 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-15 Sebastian Spaeth * ui.cc: print byte progress to one decimal place --- 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;