dns.mitm: fix issue in host file parsing

This commit is contained in:
Michael Scire 2021-01-30 20:16:45 -08:00
parent 6706fa49dc
commit a804e62293
2 changed files with 3 additions and 2 deletions

View File

@ -44,11 +44,11 @@
; enable_am_debug_mode = u8!0x0
; Controls whether dns.mitm is enabled
; 0 = Disabled, 1 = Enabled
; atmosphere!enable_dns_mitm = u8!0x1
; enable_dns_mitm = u8!0x1
; Controls whether dns.mitm uses the default redirections in addition to
; whatever is specified in the user's hosts file.
; 0 = Disabled (use hosts file contents), 1 = Enabled (use defaults and hosts file contents)
; atmosphere!add_defaults_to_dns_hosts = u8!0x0
; add_defaults_to_dns_hosts = u8!0x0
[hbloader]
; Controls the size of the homebrew heap when running as applet.
; If set to zero, all available applet memory is used as heap.

View File

@ -157,6 +157,7 @@ namespace ams::mitm::socket::resolver {
current_hostname[work] = '\x00';
g_redirection_map[static_cast<const char *>(current_hostname)] = current_address;
work = 0;
if (c == '\n') {
state = State::BeginLine;