Closed Arvamer closed 8 years ago
If I use size()
somewhere it must be a big mistake.. because I know this..
searching ..
holyshit auto receipt = tox_friend_send_message(c->toxcore(), property_nr().get_value(), TOX_MESSAGE_TYPE_NORMAL, (const uint8_t*)message.data(), message.size(), &error);
... uhm this must been happen while rewriting for toxmm..
All messages sent by gTox with any character's length more than one byte are corrupted, because Glib::ustring.size() return number of characters, not bytes. For example "aą" have 2 characters and 3 bytes ("a - 0x61, ą - 0xc4 0x85").