diff options
author | dscho <dscho> | 2005-05-24 08:56:35 +0000 |
---|---|---|
committer | dscho <dscho> | 2005-05-24 08:56:35 +0000 |
commit | 6fb77fb0c15fdc8185a160704db4c87891ace742 (patch) | |
tree | 5e5ac85e2616ab8c15d3304c58702a08a65f0949 /libvncserver | |
parent | 1b830d0446f075ac1f76d47d11b08d1bc85ab98b (diff) | |
download | libtdevnc-6fb77fb0c15fdc8185a160704db4c87891ace742.tar.gz libtdevnc-6fb77fb0c15fdc8185a160704db4c87891ace742.zip |
fix off by one bug
Diffstat (limited to 'libvncserver')
-rwxr-xr-x | libvncserver/font.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libvncserver/font.c b/libvncserver/font.c index 267d8a2..8ba1020 100755 --- a/libvncserver/font.c +++ b/libvncserver/font.c @@ -131,8 +131,8 @@ void rfbFontBBox(rfbFontDataPtr font,unsigned char c,int* x1,int* y1,int* x2,int { *x1+=font->metaData[c*5+3]; *y1+=-font->metaData[c*5+4]-font->metaData[c*5+2]+1; - *x2=*x1+font->metaData[c*5+1]; - *y2=*y1+font->metaData[c*5+2]; + *x2=*x1+font->metaData[c*5+1]+1; + *y2=*y1+font->metaData[c*5+2]+1; } #ifndef INT_MAX @@ -156,6 +156,8 @@ void rfbWholeFontBBox(rfbFontDataPtr font, if(-m[i*5+4]>(*y2)) (*y2)=-m[i*5+4]; } + (*x2)++; + (*y2)++; } rfbFontDataPtr rfbLoadConsoleFont(char *filename) |