1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 17:49:43 +01:00

Revert "Disable typing pipes in script names"

This reverts commit a806b072bd.

It causes an instant segfault if there's no entities or if you're not
editing terminals/script boxes or something, whatever it's not
crucial as a last-minute fix.
This commit is contained in:
Dav999 2024-01-10 16:39:14 +01:00 committed by Terry Cavanagh
parent 8bfcb40a17
commit 95c5bd80e1

View file

@ -3472,20 +3472,6 @@ void editorinput(void)
case EditorSubState_DRAW_INPUT: case EditorSubState_DRAW_INPUT:
// We're taking input! // We're taking input!
if (customentities[ed.text_entity].t == 18 || customentities[ed.text_entity].t == 19)
{
// This is a terminal or script box, so this is a script name.
// Remove all pipes, they are the line separator in the XML.
// When this loop reaches the end, it wraps to SIZE_MAX; SIZE_MAX + 1 is 0
for (size_t i = key.keybuffer.length() - 1; i + 1 > 0; i--)
{
if (key.keybuffer[i] == '|')
{
key.keybuffer.erase(key.keybuffer.begin() + i);
}
}
}
if (escape_pressed) if (escape_pressed)
{ {
// Cancel it, and remove the enemy it's tied to if necessary // Cancel it, and remove the enemy it's tied to if necessary