fix near-infinite loop and segfault in ARM costume asm when len == 0 (should fix #2340221)

svn-id: r36039
This commit is contained in:
Willem Jan Palenstijn 2009-01-24 19:19:24 +00:00
parent ae60d362c8
commit 3c79c6229c

View File

@ -198,7 +198,8 @@ middleloop:
@ r14= len
MOV r5,r12 @ loopCount = height
CMP r5,r14 @ if (loopCount > len)
CMP r14,#0
CMPNE r5,r14 @ if (len != 0 && loopCount > len)
MOVGT r5,r14 @ loopCount = len
SUB r12,r12,r5 @ height -= loopCount
SUB r14,r14,r5 @ len -= loopCount