We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
此Bug仅能在 LL 0.10.4 复现
向玩家发送一个 ll::form::CustomForm form; 如果玩家点击了提交按钮,服务器就会崩溃。
具体为,只要 ll::form::CustomFormResult 这一个 optional不为空,无论后面写什么代码或者说不写代码,服务器就会崩溃。
ll::form::CustomFormResult
LL 0.10.4环境下
ll::form::CustomForm form; form.setTitle("CustomForm") .appendLabel("label") .appendInput("input1", "input") .appendToggle("toggle", "toggle") .appendSlider("slider", "slider", 0, 100, 1) .appendStepSlider("stepSlider", "stepSlider", {"a", "b", "c"}) .appendDropdown("dropdown", "dropdown", {"a", "b", "c"}) .sendTo(pl, [](Player&, ll::form::CustomFormResult const& data, std::optional<ModalFormCancelReason>) { if (!data) { logger.info("CustomForm callback canceled"); return; } for (auto [name, result] : *data) { static auto logDebugResult = [&](const ll::form::CustomFormElementResult& var) { if (std::holds_alternative<uint64_t>(var)) { logger.info("CustomForm callback {} = {}", name, std::get<uint64_t>(var)); } else if (std::holds_alternative<double>(var)) { logger.info("CustomForm callback {} = {}", name, std::get<double>(var)); } else if (std::holds_alternative<std::string>(var)) { logger.info("CustomForm callback {} = {}", name, std::get<std::string>(var)); } }; logDebugResult(result); } });
以上代码来自 LL 的 Test https://github.com/LiteLDev/LeviLamina/blob/main/src/ll/test/FormTest.cpp
创建一个Custom发送给玩家 如果玩家点击了 x 关闭表单,则一切正常。 如果玩家点击了提交按钮,则服务器崩溃。
所以说这 Test 测了个寂寞?
如果玩家点击了提交按钮,服务器不会崩溃。
No response
Windows11
0.10.4
The text was updated successfully, but these errors were encountered:
fix: fix CustomFormHandler #1502
c5c7ec9
No branches or pull requests
Describe the bug
此Bug仅能在 LL 0.10.4 复现
向玩家发送一个 ll::form::CustomForm form;
如果玩家点击了提交按钮,服务器就会崩溃。
具体为,只要
ll::form::CustomFormResult
这一个 optional不为空,无论后面写什么代码或者说不写代码,服务器就会崩溃。To Reproduce
LL 0.10.4环境下
以上代码来自 LL 的 Test https://github.com/LiteLDev/LeviLamina/blob/main/src/ll/test/FormTest.cpp
创建一个Custom发送给玩家
如果玩家点击了 x 关闭表单,则一切正常。
如果玩家点击了提交按钮,则服务器崩溃。
所以说这 Test 测了个寂寞?
Expected behavior
如果玩家点击了提交按钮,服务器不会崩溃。
Screenshots
No response
Platform
Windows11
Version
0.10.4
Additional context
No response
The text was updated successfully, but these errors were encountered: