/[rdesktop]/sourceforge.net/trunk/rdesktop/cache.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/cache.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 562 by jsorg71, Fri May 30 21:31:59 2003 UTC revision 563 by jsorg71, Wed Dec 24 17:23:03 2003 UTC
# Line 162  cache_get_desktop(uint32 offset, int cx, Line 162  cache_get_desktop(uint32 offset, int cx,
162  {  {
163          int length = cx * cy * bytes_per_pixel;          int length = cx * cy * bytes_per_pixel;
164    
165            if (offset > sizeof(g_deskcache))
166                    offset = 0;
167    
168          if ((offset + length) <= sizeof(g_deskcache))          if ((offset + length) <= sizeof(g_deskcache))
169          {          {
170                  return &g_deskcache[offset];                  return &g_deskcache[offset];
# Line 177  cache_put_desktop(uint32 offset, int cx, Line 180  cache_put_desktop(uint32 offset, int cx,
180  {  {
181          int length = cx * cy * bytes_per_pixel;          int length = cx * cy * bytes_per_pixel;
182    
183            if (offset > sizeof(g_deskcache))
184                    offset = 0;
185    
186          if ((offset + length) <= sizeof(g_deskcache))          if ((offset + length) <= sizeof(g_deskcache))
187          {          {
188                  cx *= bytes_per_pixel;                  cx *= bytes_per_pixel;

Legend:
Removed from v.562  
changed lines
  Added in v.563

  ViewVC Help
Powered by ViewVC 1.1.26