--- a/QTfrontend/proto.cpp Sat Nov 08 11:54:46 2008 +0000
+++ b/QTfrontend/proto.cpp Sun Nov 09 07:51:53 2008 +0000
@@ -26,7 +26,7 @@
QByteArray & HWProto::addStringToBuffer(QByteArray & buf, const QString & string)
{
QByteArray strmsg = string.toUtf8();
- strmsg.left(250);
+ strmsg = strmsg.left(250);
quint8 sz = strmsg.size();
buf.append(QByteArray((char *)&sz, 1));
buf.append(strmsg);
--- a/hedgewars/uChat.pas Sat Nov 08 11:54:46 2008 +0000
+++ b/hedgewars/uChat.pas Sun Nov 09 07:51:53 2008 +0000
@@ -185,6 +185,8 @@
utf8:= char(Key or firstByteMark[btw]) + utf8;
+ if byte(InputStr.s[0]) + btw > 240 then exit;
+
InputStrL[byte(InputStr.s[0]) + btw]:= InputStr.s[0];
SetLine(InputStr, InputStr.s + utf8, true)
end