various: You cannot use the destination of snprintf as one of the srcs, undefined

This commit is contained in:
Peter Howkins
2018-04-14 01:23:48 +01:00
parent b410e644c0
commit caef8edac0
5 changed files with 59 additions and 24 deletions

View File

@@ -1501,6 +1501,7 @@ static const char *isoString = "ISO-8859-1";
_DtXlateDb myDb = NULL;
char myPlatform[_DtPLATFORM_MAX_LEN+1];
char myLocale[256]; /* arbitrarily large */
char myLocaleTemp[sizeof(myLocale)]; /* non-arbitrarily the same */
char *locale;
char *lang;
char *charset;
@@ -1511,7 +1512,8 @@ int isStd;
snprintf(myLocale, sizeof(myLocale), "%s", pLang);
if (*pCharset)
{
snprintf(myLocale, sizeof(myLocale), "%s.%s", myLocale, pCharset);
snprintf(myLocaleTemp, sizeof(myLocaleTemp), "%s.%s", myLocale, pCharset);
strcpy(myLocale, myLocaleTemp);
}
if ((_DtLcxOpenAllDbs(&myDb) != 0) ||