Revision: 8037 https://osdn.net/projects/ttssh2/scm/svn/commits/8037 Author: yutakapon Date: 2019-08-30 22:23:27 +0900 (Fri, 30 Aug 2019) Log Message: ----------- HTTPプロキシ接続がエラーとなり、ステータスコードが401,407,400,405,406,403以外だった場合、 メッセージボックスにゴミが表示される問題を修正した。 Modified Paths: -------------- branches/ttssh_improved/TTProxy/ProxyWSockHook.h -------------- next part -------------- Modified: branches/ttssh_improved/TTProxy/ProxyWSockHook.h =================================================================== --- branches/ttssh_improved/TTProxy/ProxyWSockHook.h 2019-08-30 12:03:08 UTC (rev 8036) +++ branches/ttssh_improved/TTProxy/ProxyWSockHook.h 2019-08-30 13:23:27 UTC (rev 8037) @@ -1363,7 +1363,9 @@ } } while (strcmp(buf,"\r\n") != 0); if (status_code != 200) { - char uimsg[MAX_UIMSG]; + char uimsg[MAX_UIMSG] = {0}; + char tmp[MAX_UIMSG]; + switch (status_code) { case 401: case 407: @@ -1374,8 +1376,15 @@ case 405: case 406: case 403: + default: + // \x8AY\x93\x96\x82\xB5\x82Ȃ\xA2\x83X\x83e\x81[\x83^\x83X\x83R\x81[\x83h\x82\xBE\x82\xC1\x82\xBD\x8Fꍇ\x81A\x95s\x92\xE8\x82ȓ\xE0\x97e\x82\xCCuimsg[]\x82\xAA + // MessageBox\x82ɕ\\x8E\xA6\x82\xB3\x82\xEA\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B + _snprintf_s(tmp, sizeof(tmp), _TRUNCATE, "%s(status code %d)", + "Proxy prevent this connection!", status_code + ); + UTIL_get_lang_msg("MSG_PROXY_BAD_REQUEST", uimsg, sizeof(uimsg), - "Proxy prevent this connection!"); + tmp); break; } return setError(s, uimsg);