ui: Include null byte in InputText fields
This commit is contained in:
parent
4928c044af
commit
457d338a97
@ -556,11 +556,11 @@ namespace ImGui {
|
||||
}
|
||||
|
||||
bool InputText(const char *label, std::string &buffer, ImGuiInputTextFlags flags) {
|
||||
return ImGui::InputText(label, buffer.data(), buffer.size(), ImGuiInputTextFlags_CallbackResize | flags, ImGui::UpdateStringSizeCallback, &buffer);
|
||||
return ImGui::InputText(label, buffer.data(), buffer.size() + 1, ImGuiInputTextFlags_CallbackResize | flags, ImGui::UpdateStringSizeCallback, &buffer);
|
||||
}
|
||||
|
||||
bool InputTextMultiline(const char *label, std::string &buffer, const ImVec2 &size, ImGuiInputTextFlags flags) {
|
||||
return ImGui::InputTextMultiline(label, buffer.data(), buffer.size(), size, ImGuiInputTextFlags_CallbackResize | flags, ImGui::UpdateStringSizeCallback, &buffer);
|
||||
return ImGui::InputTextMultiline(label, buffer.data(), buffer.size() + 1, size, ImGuiInputTextFlags_CallbackResize | flags, ImGui::UpdateStringSizeCallback, &buffer);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user