• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision9489 (tree)
Time2021-10-23 01:09:52
Authorzmatsuo

Log Message

TTProxy の TTXSetCommandLine() を Unicode化

Change Summary

Incremental Difference

--- trunk/TTProxy/TTProxy.h (revision 9488)
+++ trunk/TTProxy/TTProxy.h (revision 9489)
@@ -287,13 +287,16 @@
287287 }
288288 }
289289
290- static void PASCAL TTXSetCommandLine(PCHAR cmd, int cmdlen, PGetHNRec rec) {
291- String url = ProxyWSockHook::generateURL();
290+ static void PASCAL TTXSetCommandLine(wchar_t *cmd, int cmdlen, PGetHNRec rec) {
291+ String urlA = ProxyWSockHook::generateURL();
292+ wchar_t *urlW = ToWcharA(urlA);
293+ WString url = urlW;
294+ free(urlW);
292295 if (url != NULL) {
293- if (strlen(cmd) + 8 + url.length() >= (unsigned) cmdlen)
296+ if (wcslen(cmd) + 8 + url.length() >= (unsigned) cmdlen)
294297 return;
295- strcat_s(cmd, cmdlen, " -proxy=");
296- strcat_s(cmd, cmdlen, url);
298+ wcscat_s(cmd, cmdlen, L" -proxy=");
299+ wcscat_s(cmd, cmdlen, url);
297300 }
298301 }
299302
Show on old repository browser