Fix for string handling bug from Alex Beregszasz

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9413 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
eyck 2003-02-13 09:34:37 +00:00
parent d06f9b725e
commit 7e94383861
1 changed files with 8 additions and 8 deletions

View File

@ -1416,14 +1416,14 @@ static void mga_param_buff_fill( void )
{
unsigned len;
len = 0;
len += sprintf(&mga_param_buff[len],"Interface version: %04X\n",MGA_VID_VERSION);
len += sprintf(&mga_param_buff[len],"Memory: %x:%dM\n",mga_mem_base,(unsigned int) mga_ram_size);
len += sprintf(&mga_param_buff[len],"MMIO: %p\n",mga_mmio_base);
len += sprintf(&mga_param_buff[len],"Configurable stuff:\n");
len += sprintf(&mga_param_buff[len],"~~~~~~~~~~~~~~~~~~~\n");
len += sprintf(&mga_param_buff[len],PARAM_BRIGHTNESS"%d\n",mga_brightness);
len += sprintf(&mga_param_buff[len],PARAM_CONTRAST"%d\n",mga_contrast);
len += sprintf(&mga_param_buff[len],PARAM_BLACKIE"%s\n",regs.blackie?"on":"off");
len += sprintf(&mga_param_buff[len]-len,"Interface version: %04X\n",MGA_VID_VERSION);
len += sprintf(&mga_param_buff[len]-len,"Memory: %x:%dM\n",mga_mem_base,(unsigned int) mga_ram_size);
len += sprintf(&mga_param_buff[len]-len,"MMIO: %p\n",mga_mmio_base);
len += sprintf(&mga_param_buff[len]-len ,"Configurable stuff:\n");
len += sprintf(&mga_param_buff[len]-len,"~~~~~~~~~~~~~~~~~~~\n");
len += sprintf(&mga_param_buff[len]-len,PARAM_BRIGHTNESS"%d\n",mga_brightness);
len += sprintf(&mga_param_buff[len]-len,PARAM_CONTRAST"%d\n",mga_contrast);
len += sprintf(&mga_param_buff[len]-len,PARAM_BLACKIE"%s\n",regs.blackie?"on":"off");
mga_param_buff_len = len;
// check boundaries of mga_param_buff before writing to it!!!
}