Skip to content

Commit c8ec7ea

Browse files
committed
mahjong hu v5 fix
1 parent 0ada504 commit c8ec7ea

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

mahjong/mahjongHu_v4/gdb.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
break hulib.cpp:31
2+
break hulib.cpp:66
3+
break hulib.cpp:62

mahjong/mahjongHu_v5.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,7 @@ class MjMapTbV5 {
202202
}
203203
bool check_add(int *cards, int hunNum, bool hasJiang, MjType tpe) {
204204
int key = 0;
205-
int len = (tpe == FengZi) ? 7 : 9;
206-
for (int i = 0; i < len; i++) {
205+
for (int i = 0; i < 9; i++) {
207206
key = key * 10 + cards[i];
208207
}
209208

@@ -217,7 +216,7 @@ class MjMapTbV5 {
217216
}
218217
testMap[key] = true;
219218

220-
for (int i = 0; i < len; i++) {
219+
for (int i = 0; i < 9; i++) {
221220
if (cards[i] > 4) {
222221
return true;
223222
}

0 commit comments

Comments
 (0)