File tree 2 files changed +5
-8
lines changed
2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -146,11 +146,9 @@ int main(int argc, char *argv[])
146
146
for (int8_t i1 = cl ; i1 > 0 ; i1 -- )
147
147
{
148
148
int8_t i0 = i1 - 1 ;
149
- if (ta [i1 ] > ta [i0 ])
149
+ if (ta [i0 ] < ta [i1 ])
150
150
{
151
- uint8_t tmp ;
152
- tmp = ta [i0 ]; ta [i0 ]= ta [i1 ]; ta [i1 ]= tmp ;
153
- tmp = ti [i0 ]; ti [i0 ]= ti [i1 ]; ti [i1 ]= tmp ;
151
+ uint8_t tmp1 = ta [i0 ]; uint8_t tmp2 = ti [i0 ]; ta [i0 ]= ta [i1 ]; ti [i0 ]= ti [i1 ]; ta [i1 ]= tmp1 ; ti [i1 ]= tmp2 ;
154
152
}
155
153
else break ;
156
154
}
@@ -488,8 +486,7 @@ int main(int argc, char *argv[])
488
486
int8_t i1 = i0 + 1 ; // i1 must be uint8_t, but int8_t faster - O3 work strange
489
487
if (ta [i0 ]< ta [i1 ])
490
488
{
491
- uint8_t tmp1 = ta [i1 ]; ta [i1 ]= ta [i0 ]; ta [i0 ]= tmp1 ;
492
- uint8_t tmp2 = ti [i1 ]; ti [i1 ]= ti [i0 ]; ti [i0 ]= tmp2 ;
489
+ uint8_t tmp1 = ta [i1 ]; uint8_t tmp2 = ti [i1 ]; ta [i1 ]= ta [i0 ]; ti [i1 ]= ti [i0 ]; ta [i0 ]= tmp1 ; ti [i0 ]= tmp2 ;
493
490
}
494
491
}
495
492
}
Original file line number Diff line number Diff line change @@ -53,9 +53,9 @@ a very wide range of tasks using the Far and Windows API's.
53
53
54
54
## [ ChessKnight.c] ( https://github.com/z0hm/far-scripts/blob/master/ChessKnight.c " ChessKnight.c ")
55
55
56
- * v0.9.2.4 (24147 bytes, changed 2025-02-22 17:43 )*
56
+ * v0.9.2.4 (24115 bytes, changed 2025-02-23 15:22 )*
57
57
58
- * SHA-256 ` 5806783d5146f1f2415efed81ff9728d6b8198dd07cb8a16243f4d4760b95dd3 ` *
58
+ * SHA-256 ` 1c3801df371974959e06a816ea84f8f80cad9dd94c068e6ada67f870a5678697 ` *
59
59
60
60
For fast find solution, put the compiled ChessKnight.exe to one folder with ChessKnight.lua
61
61
You can’t perform that action at this time.
0 commit comments