mirror of https://github.com/mpv-player/mpv
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:
parent
d06f9b725e
commit
7e94383861
|
@ -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!!!
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue