From 9d0247bac46c3763bbe03b8464c39a33e16c7723 Mon Sep 17 00:00:00 2001 From: Bruce Wayne Date: Sat, 4 Jan 2020 21:25:12 +0800 Subject: [PATCH] Oops --- BilibiliApi/Utils.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BilibiliApi/Utils.cs b/BilibiliApi/Utils.cs index 6960411..b18e15c 100644 --- a/BilibiliApi/Utils.cs +++ b/BilibiliApi/Utils.cs @@ -88,7 +88,7 @@ public static DateTime GetTime(string timeStamp) public static bool IsToken(string token) { - return token.Length == 32 && Regex.IsMatch(token, @"^[a-f0-9]+$"); + return !string.IsNullOrEmpty(token) && token.Length == 32 && Regex.IsMatch(token, @"^[a-f0-9]+$"); } } }