• R/O
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

密猟オンラインクライアントプログラム JAVAベース


Commit MetaInfo

Revision4 (tree)
Time2016-01-25 17:55:10
Authormanjihq

Log Message

メールおよび掲示板読み出しがutf-8への変更によるパケットレイアウトに対応できていないのを修正

Change Summary

Incremental Difference

--- trunk/src/hunton/RecvTask.java (revision 3)
+++ trunk/src/hunton/RecvTask.java (revision 4)
@@ -183,10 +183,11 @@
183183 int n;
184184 while (hreadwnd == null) {
185185 }
186- n = (int) buffer[22];
186+ n = (int) buffer[2 + Hunt.USERNAME_LEN + 4];
187187 if (n > 0) {
188188 try {
189- subject = new String(buffer, 23, n, Hunt.SYSTEM_CHARSET);
189+ subject = new String(buffer, 2 + Hunt.USERNAME_LEN + 5, n,
190+ Hunt.SYSTEM_CHARSET);
190191 } catch (UnsupportedEncodingException e) {
191192 subject = "?";
192193 }
@@ -216,7 +217,7 @@
216217 work += "\nDate:";
217218 DateFormat df
218219 = DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL);
219- Date ntime = new Date(Hunt.ntohl(buffer, 18) * 1000);
220+ Date ntime = new Date(Hunt.ntohl(buffer, 2 + Hunt.USERNAME_LEN) * 1000);
220221 work += df.format(ntime);
221222 work += "\nSubject: ";
222223 work += subject;