Fixed a compilation warning (potential buffer overflow)

This commit is contained in:
Olivier Teulière 2009-03-18 18:53:57 +00:00
parent 6f14e34fe7
commit 3bde966efb

View file

@ -159,7 +159,7 @@ Game* Game::gameLoadFormat_14(FILE *fin, const Dictionary& iDic)
break;
//debug("%s)", token);
strncat(pos, token, sizeof(pos));
strncat(pos, token, sizeof(pos) - strlen(pos) - 1);
if ((ret = pGame->play(convertToWc(pos), convertToWc(word))))
{