Browse Source

Remove unnecessary copy

Was this meant to reset the output? It should never be changed unless the user confirms input. In practice this was calling memcpy with the same src and dest pointers, which is undefined behaviour.
pull/4209/head
ephphatha 4 years ago committed by Anders Jenbo
parent
commit
9a07c734eb
  1. 3
      Source/platform/ctr/keyboard.cpp

3
Source/platform/ctr/keyboard.cpp

@ -53,10 +53,7 @@ void ctr_vkbdFlush()
if (button == SWKBD_BUTTON_CONFIRM) {
devilution::CopyUtf8(event.outText, mybuf, event.maxLength);
continue;
}
devilution::CopyUtf8(event.outText, event.inText, event.maxLength);
}
eventCount = 0;

Loading…
Cancel
Save