diff --git a/libavutil/qsort.h b/libavutil/qsort.h index ca66c5fb62..0b352cf164 100644 --- a/libavutil/qsort.h +++ b/libavutil/qsort.h @@ -25,7 +25,7 @@ void *stack[64][2];\ int sp= 1;\ stack[0][0] = p;\ - stack[0][1] = p+num-1;\ + stack[0][1] = (p)+(num)-1;\ while(sp){\ type *start= stack[--sp][0];\ type *end = stack[ sp][1];\