diff options
author | dscho <dscho> | 2001-09-25 22:56:14 +0000 |
---|---|---|
committer | dscho <dscho> | 2001-09-25 22:56:14 +0000 |
commit | 74c7c6cd847cdf062864af1d7826785d0584731b (patch) | |
tree | c96117f44a7b92ad0c4e5552d5f822fba7e94569 | |
parent | 1342b7e17844edf3bc57eba531f59178ece2f365 (diff) | |
download | libtdevnc-74c7c6cd847cdf062864af1d7826785d0584731b.tar.gz libtdevnc-74c7c6cd847cdf062864af1d7826785d0584731b.zip |
look for align bug with odd width. Bug in vncviewer?
-rw-r--r-- | d3des.o | bin | 16796 -> 0 bytes | |||
-rw-r--r-- | example.c | 9 | ||||
-rw-r--r-- | tabletranstemplate.c | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/d3des.o b/d3des.o Binary files differdeleted file mode 100644 index 5202cef..0000000 --- a/d3des.o +++ /dev/null @@ -38,12 +38,17 @@ const int maxx=641, maxy=480, bpp=4; void initBuffer(unsigned char* buffer) { int i,j; - for(i=0;i<maxx;++i) - for(j=0;j<maxy;++j) { + for(j=0;j<maxy;++j) { + for(i=0;i<maxx;++i) { buffer[(j*maxx+i)*bpp+0]=(i+j)*128/(maxx+maxy); /* red */ buffer[(j*maxx+i)*bpp+1]=i*128/maxx; /* green */ buffer[(j*maxx+i)*bpp+2]=j*256/maxy; /* blue */ } + buffer[j*maxx*bpp+0]=0xff; + buffer[j*maxx*bpp+1]=0xff; + buffer[j*maxx*bpp+2]=0xff; + buffer[j*maxx*bpp+3]=0xff; + } } /* Here we create a structure so that every client has it's own pointer */ diff --git a/tabletranstemplate.c b/tabletranstemplate.c index 0d69f19..0aafff0 100644 --- a/tabletranstemplate.c +++ b/tabletranstemplate.c @@ -98,7 +98,7 @@ rfbTranslateWithRGBTablesINtoOUT (char *table, rfbPixelFormat *in, OUT_T *blueTable = greenTable + in->greenMax + 1; while (height > 0) { - opLineEnd = op + width; + opLineEnd = &op[width]; while (op < opLineEnd) { *(op++) = (redTable[(*ip >> in->redShift) & in->redMax] | |