Skip to content
This repository was archived by the owner on Aug 16, 2024. It is now read-only.

Commit 4811f2c

Browse files
committed
修复上传图片的错误.
1 parent 8be3360 commit 4811f2c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/mirai_bot.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,10 @@ namespace Cyan
459459
MiraiImage img;
460460
img.Id = re_json["imageId"].get<string>();
461461
img.Url = re_json["url"].get<string>();
462-
img.Path = re_json["path"].get<string>();
462+
if (!re_json["path"].is_null())
463+
{
464+
img.Path = re_json["path"].get<string>();
465+
}
463466
return img;
464467
}
465468

0 commit comments

Comments
 (0)