| 1 | Index: sdlpango-0.1.2/src/SDL_Pango.c
|
| 2 | ===================================================================
|
| 3 | |
| 4 | |
| 5 | @@ -725,16 +725,23 @@
|
| 6 | int x = rect->x;
|
| 7 | int y = rect->y;
|
| 8 |
|
| 9 | + if(x < 0) {
|
| 10 | + width += x; x = 0;
|
| 11 | + }
|
| 12 | if(x + width > surface->w) {
|
| 13 | width = surface->w - x;
|
| 14 | - if(width <= 0)
|
| 15 | - return;
|
| 16 | + }
|
| 17 | + if(width <= 0)
|
| 18 | + return;
|
| 19 | +
|
| 20 | + if(y < 0) {
|
| 21 | + height += y; y = 0;
|
| 22 | }
|
| 23 | if(y + height > surface->h) {
|
| 24 | height = surface->h - y;
|
| 25 | - if(height <= 0)
|
| 26 | - return;
|
| 27 | }
|
| 28 | + if(height <= 0)
|
| 29 | + return;
|
| 30 |
|
| 31 | if(SDL_LockSurface(surface)) {
|
| 32 | SDL_SetError("surface lock failed");
|