CON qstrcpy: don't call strcpy() with identical source and destination quotes.

Thus making the identical source and destination quote number case into the
expected no-op instead of being undefined behavior.

git-svn-id: https://svn.eduke32.com/eduke32@3510 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2013-02-21 18:53:42 +00:00
parent f6a577ff68
commit 9f843fb445

View file

@ -1985,6 +1985,7 @@ skip_check:
break; break;
case CON_QSTRCPY: case CON_QSTRCPY:
if ((ScriptQuotes[i] == NULL || ScriptQuotes[j] == NULL)) goto nullquote; if ((ScriptQuotes[i] == NULL || ScriptQuotes[j] == NULL)) goto nullquote;
if (i != j)
Bstrcpy(ScriptQuotes[i],ScriptQuotes[j]); Bstrcpy(ScriptQuotes[i],ScriptQuotes[j]);
break; break;
case CON_CHANGESPRITESECT: case CON_CHANGESPRITESECT: