summaryrefslogtreecommitdiff
path: root/Aktywator/MainForm.cs
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-10-24 00:39:10 +0200
committeremkael <emkael@tlen.pl>2018-10-24 00:39:10 +0200
commit5adb7bd504505036d3f32c5afcc6e3a5835f2d4a (patch)
treeac49b35f5cae9d4c26bd143a916c5742f6c32777 /Aktywator/MainForm.cs
parent3bbab1df5cd9caf178e6efc63e28a3898a8aaed2 (diff)
Hand record upload error handling improved
Diffstat (limited to 'Aktywator/MainForm.cs')
-rw-r--r--Aktywator/MainForm.cs10
1 files changed, 7 insertions, 3 deletions
diff --git a/Aktywator/MainForm.cs b/Aktywator/MainForm.cs
index 6144a28..09e191d 100644
--- a/Aktywator/MainForm.cs
+++ b/Aktywator/MainForm.cs
@@ -536,15 +536,19 @@ namespace Aktywator
confirmMsg.Append("\nNagłówek pliku: " + pbn.title);
}
confirmMsg.Append("\nPierwszy rozkład: ");
- for (int i = 0; i < pbn.handRecords[bws.lowBoard()].north.Length; i++)
+ int lowBoard = bws.lowBoard();
+ while (lowBoard < pbn.handRecords.Length && pbn.handRecords[lowBoard] == null) {
+ lowBoard++;
+ }
+ for (int i = 0; i < pbn.handRecords[lowBoard].north.Length; i++)
{
- if ("".Equals(pbn.handRecords[bws.lowBoard()].north[i]))
+ if ("".Equals(pbn.handRecords[lowBoard].north[i]))
{
confirmMsg.Append("renons, ");
}
else
{
- confirmMsg.Append(pbn.handRecords[bws.lowBoard()].north[i]);
+ confirmMsg.Append(pbn.handRecords[lowBoard].north[i]);
break;
}
}