Fix a crash bug in SSE nearest when scaling rects of width=1
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2015 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -94,6 +94,7 @@ SCALE_(Nearest) (SDL_Surface *src, SDL_Surface *dst, SDL_Rect *r)
|
|||||||
|
|
||||||
even_x:
|
even_x:
|
||||||
shr ecx, 1 // x = rw / 2
|
shr ecx, 1 // x = rw / 2
|
||||||
|
jz end_x // rw was 1
|
||||||
|
|
||||||
loop_x:
|
loop_x:
|
||||||
// two-pixel transfer
|
// two-pixel transfer
|
||||||
@@ -112,6 +113,7 @@ SCALE_(Nearest) (SDL_Surface *src, SDL_Surface *dst, SDL_Rect *r)
|
|||||||
dec ecx
|
dec ecx
|
||||||
jnz loop_x
|
jnz loop_x
|
||||||
|
|
||||||
|
end_x:
|
||||||
// try to prefetch as early as possible to have it on time
|
// try to prefetch as early as possible to have it on time
|
||||||
PREFETCH (esi + eax)
|
PREFETCH (esi + eax)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user