Commit 93fa6554 authored by feihuaduo's avatar feihuaduo

修复部分卡转为卡组码错误的问题

parent 7a571530
......@@ -350,13 +350,15 @@ public class Deck implements Parcelable {
StringBuilder compressedId1 = new StringBuilder();
StringBuilder compressedId2 = new StringBuilder();
String ids = id + "";
while (ids.startsWith("0")) {
ids = ids.substring(1);
}
// while (ids.startsWith("0")) {
// ids = ids.substring(1);
// }
int lenght = ids.length();
for (int i = 0; i < lenght / 2; i++) {
int n=lenght / 2;
if (lenght%2!=0)
n++;
for (int i = 0; i <n; i++) {
int start = i * 2;
int end = Math.min(start + 2, lenght);
compressedId1.append(getCardIdCompressedId(ids.substring(start, end)));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment