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]; |
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; |