Finally remove annoying printf that I added for debugging, and use safer snprintf to ensure that we never again go overwriting random memory here.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@224 4a71c877-e1ca-e34f-864e-861f7616d084
master
Per Inge Mathisen 2005-08-03 21:23:01 +00:00
parent 3346f67917
commit 1fb0ececc3
1 changed files with 3 additions and 3 deletions

View File

@ -1892,14 +1892,14 @@ DBPRINTF(("addText : %s\n",txt));
// show a background piccy
VOID displayTitleBitmap(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours)
{
STRING sTmp[128];
const size_t sTmpSize = 200;
STRING sTmp[sTmpSize];
iV_SetFont(WFont);
iV_SetTextColour(-1);
sprintf(sTmp, "Version 2.0 beta %s w/%s - Built %s", SVN_REVISION,
snprintf(sTmp, sTmpSize, "Version 2.0 beta %s w/%s - Built %s", SVN_REVISION,
pie_Hardware() ? "OpenGL" : "SDL", __DATE__);
printf("Version: %s\n", sTmp); fflush(NULL);
pie_DrawText270(sTmp,DISP_WIDTH-10,DISP_HEIGHT-15);
}