Skip to content

Commit

Permalink
small fix to avoid out-of-bound access to slotarray
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisVeigl committed May 9, 2021
1 parent 72c6b62 commit aafa5bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion FabiGUI_C#/PortIO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void WorkThreadFunction()
receivedString = serialPort1.ReadLine();
// byte[] my_bytes = System.Text.Encoding.Default.GetBytes(command);

if (!receivedString.Contains("VALUES"))
if (!receivedString.Contains("VALUES"))
Console.Write("received:" + receivedString);

BeginInvoke(this.stringReceivedDelegate, new Object[] { receivedString });
Expand Down Expand Up @@ -184,6 +184,7 @@ public void gotAT(String newATCommand)
newATCommand = newATCommand.Replace("\r", "");
newATCommand = newATCommand.Replace("\n", "");
Console.WriteLine("adding:" + newATCommand);
if (actSlot < 0) return;
slots[actSlot].settingStrings.Add(newATCommand);
if (newATCommand.StartsWith("AT SC"))
{
Expand Down

0 comments on commit aafa5bc

Please sign in to comment.