Mercurial > mplayer.hg
changeset 9412:ed98b850668d
Fix for string handling bug from Alex Beregszasz
author | eyck |
---|---|
date | Thu, 13 Feb 2003 09:34:37 +0000 |
parents | 382534a5a830 |
children | 0d86fe21b281 |
files | drivers/mga_vid.c |
diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/drivers/mga_vid.c Wed Feb 12 23:26:12 2003 +0000 +++ b/drivers/mga_vid.c Thu Feb 13 09:34:37 2003 +0000 @@ -1416,14 +1416,14 @@ { 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!!! }