# # patch "ChangeLog" # from [d3e24bb1960a28fcdf6539ab28650760cf3f7f4c] # to [dd5fe58b00e0c70505963f1481c41f24c1c510eb] # # patch "file_io.cc" # from [da07ec92b669445496f03005c735d6b41911e422] # to [6020df3045303518edd29e3a9990914f3dfb7174] # ======================================================================== --- ChangeLog d3e24bb1960a28fcdf6539ab28650760cf3f7f4c +++ ChangeLog dd5fe58b00e0c70505963f1481c41f24c1c510eb @@ -1,3 +1,9 @@ +2005-08-31 Nathaniel Smith + + * file_io.cc (set_char_is_binary, guess_binary): static_cast chars + to uint8_t before using as array indices. Also replace some ints + with size_t's to quiet g++ warnings. + 2005-08-31 Marcel van der Boom * std_hooks.lua (execute_confirm): New function. ======================================================================== --- file_io.cc da07ec92b669445496f03005c735d6b41911e422 +++ file_io.cc 6020df3045303518edd29e3a9990914f3dfb7174 @@ -130,7 +130,7 @@ void set_char_is_binary(char c, bool is_binary) { - char_is_binary[c] = is_binary; + char_is_binary[static_cast(c)] = is_binary; } static void @@ -141,25 +141,25 @@ // Should be calling a lua hook here that can use set_char_is_binary() // That will at least fix (b) string nontext_chars("\x01\x02\x03\x04\x05\x06\x0e\x0f" - "\x10\x11\x12\x13\x14\x15\x16\x17\x18" - "\x19\x1a\x1c\x1d\x1e\x1f"); + "\x10\x11\x12\x13\x14\x15\x16\x17\x18" + "\x19\x1a\x1c\x1d\x1e\x1f"); set_char_is_binary('\0',true); - for(int i=0;i(s[i]) ]) return true; } return false;