Mercurial > MadButterfly
comparison src/redraw_man.c @ 115:3895d2224e67
Tank
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sun, 14 Sep 2008 02:17:57 +0800 |
parents | 1909d53071ab |
children | 257a1d314bcd |
comparison
equal
deleted
inserted
replaced
114:1909d53071ab | 115:3895d2224e67 |
---|---|
41 int i, j; | 41 int i, j; |
42 unsigned int val; | 42 unsigned int val; |
43 | 43 |
44 for(i = 1; i < num; i++) { | 44 for(i = 1; i < num; i++) { |
45 val = *(unsigned int *)(elms[i] + off); | 45 val = *(unsigned int *)(elms[i] + off); |
46 for(j = i; j > 0; j--) { | 46 for(j = i - 1; j > 0; j--) { |
47 if(*(unsigned int *)(elms[j - 1] + off) <= val) | 47 if(*(unsigned int *)(elms[j - 1] + off) <= val) |
48 break; | 48 break; |
49 elms[j] = elms[j - 1]; | 49 elms[j] = elms[j - 1]; |
50 } | 50 } |
51 elms[j] = elms[i]; | 51 elms[j] = elms[i]; |