密猟オンラインクライアントプログラム JAVAベース
メールおよび掲示板読み出しがutf-8への変更によるパケットレイアウトに対応できていないのを修正
| @@ -183,10 +183,11 @@ | ||
| 183 | 183 | int n; |
| 184 | 184 | while (hreadwnd == null) { |
| 185 | 185 | } |
| 186 | - n = (int) buffer[22]; | |
| 186 | + n = (int) buffer[2 + Hunt.USERNAME_LEN + 4]; | |
| 187 | 187 | if (n > 0) { |
| 188 | 188 | 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); | |
| 190 | 191 | } catch (UnsupportedEncodingException e) { |
| 191 | 192 | subject = "?"; |
| 192 | 193 | } |
| @@ -216,7 +217,7 @@ | ||
| 216 | 217 | work += "\nDate:"; |
| 217 | 218 | DateFormat df |
| 218 | 219 | = 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); | |
| 220 | 221 | work += df.format(ntime); |
| 221 | 222 | work += "\nSubject: "; |
| 222 | 223 | work += subject; |