KoKuToru / gTox

[abandoned] GTK3 Tox-Client
GNU General Public License v3.0
45 stars 7 forks source link

Use Glib::ustring.bytes() instead of .size() #187

Closed Arvamer closed 8 years ago

Arvamer commented 8 years ago

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").

KoKuToru commented 8 years ago

If I use size() somewhere it must be a big mistake.. because I know this..

searching ..

KoKuToru commented 8 years ago

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..