Browse Source

Do not limit clipboard paste to 31 characters.

Previously the clipboard contents were limited to
SDL_TEXTINPUTEVENT_TEXT_SIZE-1 (31 characters).

This is not necessary since the contents of the clipboard are written
directly to the UI element's buffer.

This is especially useful when pasting IPv6 addresses.
pull/497/head
Fabian Bieler 6 years ago committed by Anders Jenbo
parent
commit
8ee3e75199
  1. 1
      SourceX/DiabloUI/diabloui.cpp

1
SourceX/DiabloUI/diabloui.cpp

@ -182,7 +182,6 @@ void UiFocusPageDown()
void selhero_CatToName(char *in_buf, char *out_buf, int cnt)
{
std::string output = utf8_to_latin1(in_buf);
output.resize(SDL_TEXTINPUTEVENT_TEXT_SIZE - 1);
strncat(out_buf, output.c_str(), cnt - strlen(out_buf));
}

Loading…
Cancel
Save