Skip to content
Snippets Groups Projects
Commit b5df4900 authored by deuce's avatar deuce
Browse files

Fix horrible errors in size of bitmap calculations... width is passed in

BITS, not bytes.  Hopefully fixed (untested)

Thanks to Arpawolf for bringing this to my attention.  This bug affects all
X console programs (scfg, uedit, umonitor, syncterm, echocfg, sbbsinst, etc)
parent 5a4752dd
No related branches found
No related tags found
No related merge requests found
......@@ -1207,13 +1207,16 @@ scale_bitmap(char *bitmap, int width, int height, int *multiplier)
char *outbyte;
int pos;
int bmpsize;
int bytesperline=1;
while(bytesperline*8<width)
bytesperline++;
if(*multiplier>MAX_SCALE)
*multiplier=MAX_SCALE;
if(*multiplier < 1)
*multiplier=1;
bmpsize=width*height;
ret=(char *)malloc(bmpsize*(*multiplier)*(*multiplier));
bmpsize=width*height/(8*bytesperline);
ret=(char *)malloc(bmpsize*(*multiplier)*(*multiplier)/(8*bytesperline));
if(ret==NULL)
return(NULL);
outbyte=ret;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment