From 2282c8e30897a93ae8bb97933001767599b71564 Mon Sep 17 00:00:00 2001 From: 21pages Date: Sat, 26 Jul 2025 18:41:57 +0800 Subject: [PATCH] opt assert for debug (#12420) Signed-off-by: 21pages --- flutter/lib/common.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flutter/lib/common.dart b/flutter/lib/common.dart index f54b88e88..fda3f84e3 100644 --- a/flutter/lib/common.dart +++ b/flutter/lib/common.dart @@ -1583,7 +1583,9 @@ String bool2option(String option, bool b) { option == kOptionForceAlwaysRelay) { res = b ? 'Y' : defaultOptionNo; } else { - assert(false); + if (option != kOptionEnableUdpPunch && option != kOptionEnableIpv6Punch) { + assert(false); + } res = b ? 'Y' : 'N'; } return res;