From 1766dc933b916c81b2ab53eb5e87244b8662c44b Mon Sep 17 00:00:00 2001 From: hyr Date: Sun, 6 Sep 2026 00:54:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20split=20=E4=B8=BA?= =?UTF-8?q?=20NULL=20=E6=97=B6=20xy=5Fstr2float(split+1)=20=E7=9A=84?= =?UTF-8?q?=E6=AE=B5=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/framework/source.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/framework/source.c b/src/framework/source.c index 50bb6b0d..fd15f6b6 100644 --- a/src/framework/source.c +++ b/src/framework/source.c @@ -118,7 +118,7 @@ parse_and_say_curl_result (char *curl_buf) // say(curl_buf); say(split+1); int http_code = xy_str2int (curl_buf); - double speed = xy_str2float (split+1); + double speed = split ? xy_str2float (split+1) : 0.0; char *speedstr = to_human_readable_speed (speed); /* xy_str2int() 可能会返回0,表示转换失败 */